Australia, at lunch on the fifth and final day, were 291 for nine, needing just 20 more runs to reach their victory target of 311.
When Australia lost their ninth wicket, they were 80 runs adrift and all but out of the match.
But a last-wicket stand so far worth 60 between Brad Haddin (69 not out) and James Pattinson (22 not out) rattled England and the bulk of a 17,000 capacity sun-drenched crowd.
In their first innings, Australia saw Phil Hughes (81 not out) and Agar add 163 -- a Test record partnership for the 10th wicket.
Also Read
They didn't need as many now and wicketkeeper Haddin and last man Pattinson set about trying to secure a stunning win.
Anderson, after bowling 13 consecutive overs Sunday for a return of three for 29 with six maidens, was replaced by fast bowler Steven Finn.
Jonny Bairstow then had a chance to run out Haddin but his throw from cover-point missed the stumps.
Haddin, with 26 needed to win, was dropped on 64 by a diving Finn, running round in the deep, off Swann.
Australia resumed on 174 for six still needing a futher 137 runs to win after they lost three wickets for three runs late into the play yesterday.