Australia's captain Steve Smith (C) adjusts his collar as he walks off the field with teammates after beating Pakistan in the first day-night cricket Test match between Australia and Pakistan in Brisbane on December 19, 2016. SAEED KHAN/AFP/Getty Images

It would have been the highest successful run chase in Test cricket history, but Pakistan fell just short of a remarkable win, as Australia took a 1-0 lead in the series with a 39-run victory.

Pakistan were set 490 to win when Australia declared at dinner on day three, and when the visitors were 6/220 the result looks all be certain.

A Man of the Match performance from Asad Shafiq helped the tourists get back into the contest, and while needing 108 runs with just two wickets in hand at the beginning of day five looked like a challenge, it certainly wasn't impossible.

Shafiq and Yasir Shah combined for 71 runs in their ninth-wicket partnership, and the pair chopped Australia's lead down to just 40 runs before disaster struck.

Mitchell Starc's short delivery caught Shafiq on the glove and fell to Warner at gully, as the momentum swung straight back into Australia's favour.

Shafiq would leave the field with 137 runs to his name, in what was one of the most impressive knocks of his career to date.

Steve Smith caught Yasir Shah off-guard just four balls later, as Shah's outside-edge rolled to Smith in the slips, and the Aussie captain's quick thinking ran Shah out as soon as he turned his back.