BRISBANE - Asad Shafiq didn't need to look far for inspiration. Down one end, adjacent to the player pavilion, was a small but rowdy group of ex-pats chanting “Pakistan Zindabad” long live Pakistan.

Just about everyone had written off Pakistan's chances of winning the series-opening day-night test against Australia. No team had ever scored more than 418 to win a test match. And Pakistan, needing 490, had been skittled for 142 in the first innings. The two most senior batsmen were out on day four, when Pakistan slipped to 173-5.

That's when Shafiq took charge, batting at No. 6. He shared partnerships of 47 with Sarfraz Ahmed (24), 92 with Mohammad Amir (48) and 66 with Wahab Riaz (30) to defy the Australian bowling attack, helping Pakistan reach 382-8 on Sunday night.

“Once I got in, once I was hitting well, two or three partnerships gave us belief we could do it,” Shafiq said. “I had feelings we could chase it down.” The lower order “showed a lot of courage. We almost chased 490, because of our tail,” he said. “There was energy, thinking we had to go for the match” he added.

Shafiq equaled his highest Test score of 137 before he fended at a short-pitched ball and gave David Warner a simple, lobbed catch at gully, ending the 71-run ninth-wicket stand. The Australians won by 39 runs to take a 1-0 lead in the three-match series, but Pakistan took all the confidence out of the Gabba, a test that will be remembered more for Shafiq's unflappable stand than anything else. “I'd be happier if we'd won the match we almost chased it down,” said Shafiq. “It takes a very good team to do that.”