BRISBANE: Skipper Steve Smith threw down the stumps from second slip to run out Yasir Shah four balls after Asad Shafiq's defiant innings ended, ensuring Australia held off Pakistan by 39 runs to win the series-opening day-night test and extend its unbeaten streak at the Gabba.



Pakistan started the last day needing 108 to win and Australia needed two wickets. Fewer than 1,000 people were in the crowd when play started half an hour early Monday under overcast skies, including a small but vocal group of ex-pat Pakistanis cheering every run.



But Shafiq and Shah kept the pressure on Australia in a 71-run partnership that went close to giving Pakistan an unlikely world-record victory after being set 490 to win.



No team had ever scored more than 418 in the fourth innings to win a test match.



Shafiq guided the lower-order from 173-5 until he was finally out for 137, his equal-highest test score, fending at a short Mitchell Starc delivery to glove a catch to David Warner at gully. His dismissal left Pakistan at 449-9, needing 41 for victory.



Shah, who scored a career-high 33, dug out a Yorker from Starc four balls later, edging it on the ground to slip but was caught out of his ground when Smith threw down the stumps.



It was a courageous chase from Pakistan, which entered the series after a series loss in New Zealand and was bowled out for 142 in its first innings in reply to Australia's 429. Smith elected not to enforce the follow-on despite having a 287-run lead, and then declared at 202-5 on day three, setting Pakistan its massive run chase.



Pakistan had lost its previous nine tests in Australia and had never won a test at the Gabba, where Australia is unbeaten since 1988.