Pakistan are on the verge of a stunning victory. When they left the field in gentle sunlight – to the mild surprise of those who thought they might like to claim the extra half-hour – they needed 40 more runs with seven wickets remaining. This is Headingley where strange things happen, but surely Australia cannot dig themselves out of this hole.

It was another captivating day. Out came the sunshine; out came the spectators and in came the notion that these neutral Tests are a fine idea. It has been constantly enthralling; there have been sublime moments such as when Mohammad Asif and Mohammad Aamer exploited the cloud cover on the first day with high-calibre bowling; and ridiculous ones with schoolboy run-outs (Danish Kaneria) and dropped catches (Mike Hussey on Thursday and Shane Watson yesterday).

The final equation looked appetising. Having bowled Australia out for 349, Pakistan required 180 runs to win, which seemed just about perfect for the neutral onlooker. In the final session the crowd swelled in the West Stand with Pakistan supporters but also with cricket lovers, who were not averse to the prospect of seeing Ricky Ponting's Australians struggling to avoid defeat. And they still appreciate a good game of cricket up here.

A target of 180 was certainly more than Pakistan were hoping for at the start of play, though it was one they would have welcomed with open arms when they started the match, apparently in disarray after defeat at Lord's and the sudden loss of their captain.

It was anticipated that the Australians would make life very tricky for a greenhorn line-up. The Pakistanis set off rapidly. Even the dismissal of Salman Butt, caught at slip off Ben Hilfenhaus, failed to slow their progress. But for two late wickets for Doug Bollinger the match would already be over.

The frontline seamers failed to threaten at the start of the Pakistan innings, which has been the case throughout the series. The standard Australian response to a crisis "Come and have a bowl, Shane" was tried. But on this occasion it was Watson rather than Warne that Ponting had to turn to and this time there were no miracles.

Imran Farhat, who had been dropped by Watson at slip on four, began to bat with panache. Azhar Ali, at the other end, looked nerveless. He had not experienced the traumas of Sydney back in January. He possessed no scars, but the fearlessness of youth. Bollinger eventually yorked Farhat and Umar Amin was caught behind for a duck. Despite those setbacks they could contemplate a victory tomorrow morning.

Before play began there was a growing expectation that Australia, with 13 consecutive victories against Pakistan in the bag, would somehow reassert themselves. But Ponting, driving airily at Aamer, was soon caught behind. Mike Hussey was also defeated by the irrepressible Aamer, a cutter bouncing surprisingly and edged from the shoulder of the bat to second slip. Marcus North, often a sketchy starter, was then bowled off the inside edge with Australia still needing six for parity.

Now the Australians rallied valiantly. Michael Clarke began to middle the ball but after the interval he edged Asif behind. Even so the Australians kept attacking via Tim Paine, but more spectacularly through Steve Smith. Paine had reached 33 when he patted a long-hop from Kaneria to cover. Smith enjoyed more success against the leg-spinner.

With his high, static backlift and stance Smith is unorthodox; he is also aggressive and in possession of a superb eye. There were several awesome pulls and twice he smashed leg-breaks to the rugby stand. The first drive landed in the bucket seats, the second on the roof, down which the ball rolled before coming to rest in the gutter. Over the next decade we will become ever more accustomed to his idiosyncrasies. We may well see much more of Azhar Ali too, whose calm orthodoxy was mightily impressive.

Smith's 77 seemed to have given his team a chance. But, defying recent history, Pakistan's upper order advanced smoothly towards victory. England beware.