Pakistan skipper Sarfraz Ahmed has won the toss and elected to bat in the second test of a series that is up for grabs after Australia's fourth-innings comeback in the opening match.

Pakistan made two changes, giving top-order batsman Fakhar Zaman and left-arm seamer Mir Hamza test debuts as replacements for Imam-ul-Haq and Wahab Riaz.

Australia retained the same XI that salvaged an expected draw in Dubai by batting for almost 140 overs and finishing at 362-8 in the fourth innings after being set a victory target of 462 on a seemingly deteriorating wicket expected to assist spin.

Australia's Travis Head, left, and Usman Khawaja take a break during their test match against Pakistan in Dubai, United Arab Emirates, Thursday, Oct. 11, 2018. (AP PhotoKamran Jebreili)

Australia's Travis Head, left, and Usman Khawaja take a break during their test match against Pakistan in Dubai, United Arab Emirates, Thursday, Oct. 11, 2018. (AP PhotoKamran Jebreili)

After posting 482, Pakistan bowled Australia out for 202 in the first innings — taking 10-60 after the visitors made a promising start — and then declared in the second innings at 181-6 in order to have 1 ½ days to push for victory.

Opener Usman Khawaja scored 141 for Australia, sharing valuable partnerships with Aaron Finch (49), Travis Head (72) and captain Tim Paine (61 not out) to force the draw.

Lineups:

Pakistan's bowler Yasir Shah celebrates after dismissal of Usman Khawaja during their test match in Dubai, United Arab Emirates, Thursday, Oct. 11, 2018. (AP PhotoKamran Jebreili)

Pakistan's bowler Yasir Shah celebrates after dismissal of Usman Khawaja during their test match in Dubai, United Arab Emirates, Thursday, Oct. 11, 2018. (AP PhotoKamran Jebreili)

Pakistan: Fakhar Zaman, Mohammad Hafeez, Azhar Ali, Haris Sohail, Babar Azam, Asad Shafiq, Sarfraz Ahmed, Mir Hamza, Bilal Asif, Mohammad Abbas, Yasir Shah.

Australia: Usman Khawaja, Aaron Finch, Shaun Marsh, Mitchell Marsh, Travis Head, Marnus Labuschangne, Tim Paine (captain), Mitchell Starc, Peter Siddle, Nathan Lyon, Jon Holland.

Umpires: Sundaram Ravi, India, and Richard Illingworth, England.

Pakistan players shake hands with Australian batsmen at the end of their test match in Dubai, United Arab Emirates, Thursday, Oct. 11, 2018. (AP PhotoKamran Jebreili)

Pakistan players shake hands with Australian batsmen at the end of their test match in Dubai, United Arab Emirates, Thursday, Oct. 11, 2018. (AP PhotoKamran Jebreili)

TV Umpire: Richard Kettleborough, England. ICC Match referee: Ranjan Madugalle, Sri Lanka.