Nathan Lyon snared four wickets in six deliveries as Pakistan's top order crumbled against the Australian offspinner on the opening morning of the second cricket test, slumping to 77-5 at lunch.

In a stunning 11-minute period, Lyon (4-12) took a return catch to remove Azhar Ali (15) and then had Haris Sohail, Asad Shafiq and Babar Azam all out without scoring.

Pakistan was in a reasonable position at 57-1 after winning the toss and electing to bat on Tuesday, and it was a dropped catch in the 19th over that seemed to trigger a change in momentum.

Australia's Mitchell Starc, center, celebrates with his teammates dismissal of Pakistan's Muhammad Hafeez during their test match in Abu Dhabi, United Arab Emirates, Tuesday, Oct. 16, 2018. (AP PhotoKamran Jebreili)

Australia's Mitchell Starc, center, celebrates with his teammates dismissal of Pakistan's Muhammad Hafeez during their test match in Abu Dhabi, United Arab Emirates, Tuesday, Oct. 16, 2018. (AP PhotoKamran Jebreili)

Lyon took wickets on consecutive balls to end his fourth over — the 20th of the innings.

Asad Shafiq blocked the hat-trick ball, the first ball of the 22nd over, but got a feint inside edge to Lyon's subsequent delivery and was caught at bat-pad by Labuschagne after a successful decision review from the Australians. Lyon struck again two balls later and, at that stage, he had figures of 4.4-4-4-4 and Pakistan was 57-5.

In the process, Lyon surpassed ex-paceman Mitchell Johnson to move into No. 4 spot on Australia's list of all-time leading wicket takers with 314.

Australia's Mitchell Starc, second left, celebrates with his teammates dismissal of Pakistan's Muhammad Hafeez during their test match in Abu Dhabi, United Arab Emirates, Tuesday, Oct. 16, 2018. (AP PhotoKamran Jebreili)

Australia's Mitchell Starc, second left, celebrates with his teammates dismissal of Pakistan's Muhammad Hafeez during their test match in Abu Dhabi, United Arab Emirates, Tuesday, Oct. 16, 2018. (AP PhotoKamran Jebreili)

Only Fakhar Zaman, on test debut, defied the Australian attack in the first session, hitting a boundary on the last ball before lunch to go to the interval at 49 not out.

Pakistan's precarious position could have been worse. Zaman was on 30 in the 19th over when Marnus Labuschagne put down a chance at mid-wicket off Holland's bowling, and he later survived a close run out.

Labuschangne had earlier brought off a sensational catch close to the wicket to dismiss Mohammad Hafeez (4) in Mitchell Starc's second over before Zaman and Ali shared a half-century stand for the second wicket.

Australia appears to have regained momentum after salvaging an unexpected draw in the first test by batting for almost 140 overs and finishing at 362-8 in the fourth innings after being set a victory target of 462.

Pakistan made two changes to the lineup that started in Dubai, giving Zaman and left-arm seamer Mir Hamza test debuts as replacements for Imam-ul-Haq and Wahab Riaz.