Teenage debutant Ashton Agar fell agonisingly short of becoming the first Test match No 11 to score a century but still helped give Australia the edge in their Ashes opener against England at Trent Bridge on Thursday.
England, at tea on the second day of the first Test, were 11 for two in their second innings with Mitchell Starc on a hat-trick after removing Joe Root and Jonathan Trott with successive deliveries.
Earlier it seemed England would have a commanding first innings lead as Australia collapsed to 117 for nine in reply to the Ashes-holders' first innings 215.
But 19-year-old Agar went on to make 98 -- the highest score by any Test No 11, surpassing Tino Best's 95 for the West Indies against England at Edgbaston last year.
Together with fellow left-hander Phil Hughes (81 not out), Agar shared a Test record 10th wicket partnership of 163.
This topped the previous last wicket record stand of 151 shared jointly by Brian Hastings and Richard Collinge for New Zealand against Pakistan at Auckland in 1972/73 and Azhar Mahmood and Mushtaq Ahmed for Pakistan against South Africa at Rawalpindi in 1997/98.
Australia resumed Thursday on 75 for four, a deficit of 140 runs, after an overcast first day where seamer Peter Siddle rocked England with five for 50.
But Thursday saw sunshine and blue skies which promised better batting conditions for Steven Smith, 38 not out overnight, and Hughes.
James Anderson, who on Wednesday had gone past England fast bowling great Fred Trueman's record of 307 Test wickets, made the breakthrough Thursday.
Smith, driving loosely at Anderson, gaining reverse-swing, was caught behind by wicket-keeper Matt Prior for 53.
This was the start of an Australia collapse that saw five wickets lost for nine runs.
Agar did survive a desperately close stumping appeal from Prior off spinner Graeme Swann on six, with Australia then 131 for nine -- 84 runs adrift -- as third umpire Marais Erasmus eventually ruled in his favour.
Agar, primarily a left-arm spinner and a shock selection for this Test after playing just 10 first-class matches for Western Australia with a highest score of 71 not out, then cashed in with shots worthy of a top-order batsman.
The fall of the ninth wicket saw Thursday's first session extended by 90 minutes but this allowed Agar to late cut Swann for four to level the scores after he'd struck the spinner for a brilliant straight six.
But, in sight of a century, Agar -- recently playing club cricket for southern English side Henley -- pulled Stuart Broad to Swann at deep midwicket to end a two-and-quarter hour innings of 101 balls including 12 fours and two sixes.
Anderson starred for England with five for 70, his 14th haul of five or more wickets in an innings in 83 Tests.
England then saw Root caught down the legside by wicketkeeper Brad Haddin and next ball Trott was given not out by Pakistani umpire Aleem Dar after a raucous Starc lbw appeal.
Australia reviewed the decision and, with the technology at his disposal not detecting an edge, Erasmus instructed the decision be reversed.
Trott was stunned and later the 'snicko' system, not yet used by third umpires because of the length of time it takes, revealed a thin nick.