Australian spin king Nathan Lyon moved to within three wickets of joining the elite 500 club Friday as
Pakistan dug deep to stay in touch on day two of the opening Test in Perth.
At stumps, the visitors were 132-2, trailing by 355, with a dogged Imam-ul-Haq not out 38 and night watchman Khurram Shahzad on seven after they lost skipper Shan Masood late on.
But it was a slow grind with their runs coming off 53 overs after Aamer Jamal took 6-111 on debut to help dismiss the hosts for 487.
Mitchell Marsh starred with 90 after David Warner's defiant 164 on day one.
Abdullah Shafique was the first to fall in reply, getting a big inside edge from Lyon to Warner at leg slip after grinding to 42.
It was the veteran's 497th Test wicket as he closes in on 500 to join a group of just seven other players.
At the other end, Haq was stoic, weathering a fiery bowling blitz from Mitchell Starc, Josh Hazlewood and Pat Cummins on a pitch that still had some zip.
It took him 85 deliveries before his first boundary, guiding one fine off his hip.
Aggressive skipper Shan Masood made 30 before his stay ended 10 minutes before close, caught behind by Alex Carey off Starc on review.
Shan had earlier taken a nasty blow to the back when he turned to avoid a Haq drive, but was able to continue after treatment. The visitors kept themselves in the hunt for a first Test win in the country
since 1995 by dismissing Australia early in the second session, after the home side went to lunch at 476-7.