Opener Usman Khawaja missed a century by nine Monday and Steve Smith fell short of completing 8,000 runs as Australia ended the opening day of the third and final Test on 232-5 against Pakistan in Lahore.

Khawaja followed up his 160 in the drawn Karachi Test with a sedate 91, while Smith scored 59 as the pair helped Australia recover from pacer Shaheen Shah Afridi’s double strike at the start of the match.

At the close, Cameron Green was on 20 and Alex Carey eight, surviving the second new ball until bad light brought closure two overs early.

Australia, who won the toss and chose to bat on a brownish Gaddafi Cricket Stadium pitch, owed their recovery to a third-wicket stand of 138 between Khawaja and Smith.

Shaheen had Australia in trouble at 8-2 in the third over when he trapped David Warner lbw for seven and then had Marnus Labuschagne edge behind to wicketkeeper Mohammad Rizwan for a duck two balls later.

But Pakistan-born Khawaja batted in the same vein that earned him scores of 97, 160 and 44 not out so far in the series before he fell agonisingly short of a 12th Test century.

Khawaja edged spinner Sajid Khan to slip where Babar Azam dived to his right to take a brilliant one-handed catch.

Khawaja batted for 328 minutes, hit nine boundaries and a six.

“I am happy at the way I batted today,” said Khawaja. “It was tough scoring runs because I think there are cracks on the pitch which are good for us.

“The one I got out, it’s like sometimes you miss it and sometimes you edge it.”

Smith pushed spinner Sajid for two to reach his 36th Test half century but fell in the second over after tea when he was trapped leg-before by pacer Naseem Shah.

He fell just seven short of completing 8,000 Test runs.

Naseem then had Travis Head caught behind for 26 to finish with 2-36, while Shaheen had figures of 2-39.

Naseem said he will cherish the wicket of Smith, regarded as one of the best in world cricket.

“He is a great player, no doubt,” said the 19-year-old. “His wicket has given me confidence, and I was trying to restrict his scoring and in that process got him out.

“I will come back tomorrow and bowl better.”

The three-match series is tied at 0-0 after the Tests in Rawalpindi and Karachi ended in draws.

Australia are touring Pakistan for the first time since 1998, having previously refused to play in the country because of security fears.

The match marks the return of Test cricket to Lahore for the first time since a 2009 terror attack on the Sri Lanka team bus.