Paceman Mitchell Starc removed Asad Shafiq for 30 in the fifth over after the break and O'Keefe sent back Misbah-ul-Haq for 38 and Wahab Riaz in the 40 minutes before tea, the latter clubbing three successive fours off Lyon for his 12.

If 42-year-old Pakistan skipper Misbah does decide to retire, he will not want to be reminded of his final stroke in Test cricket, a mistimed heave which looped into the air for Lyon to take comfortably at mid-off.

Wahab was less to blame for his exit, given out caught behind when a review revealed a tiny spike in the Snickometer waveform.

Mohammad Amir, who is carrying a rib injury, then ran himself out for four before Hazlewood performed the coup de grace by having Imran caught in the cordon.

Sarfraz Ahmed fired his 11th Test half century to frustrate the Australians and finished unbeaten after a 70-ball 72.

The hosts had won the day-night opening Test in Brisbane by 39 runs and the second Test in Melbourne by an innings and 18 runs.