Matt Prior's thrilling last-ditch bid to save the Investec series, and England's world number one status, ended in a 51-run defeat against South Africa at Lord's.

Prior (73) produced the most exhilarating of three England 50s but, even after his reprieve on 67 when he was called back from almost the pavilion steps after holing out off a Morne Morkel no-ball, he could not get the hosts over the line.

It was nonetheless not until he was ninth out, caught at first slip off Vernon Philander (five for 30) with the second new ball, that England were finally done - bowled out for 294, when last man Steven Finn went to the very next delivery, in pursuit of an improbable 346.

It was testament to the never-say-die spirit in Andrew Strauss' team - minus Kevin Pietersen after he was controversially dropped here over the well-chronicled breakdown in his relationship with his employers and captain - that they should dispute the outcome well into the final session, and narrow the margin so admirably against superior opponents.

There is, however, no hiding the fact that since famously going to the top of the International Cricket Council rankings for the first time a year ago they have lost six out of 11 Tests - and won just three.

Prior, Jonathan Trott (63) and Jonny Bairstow (54) - following up his first-innings 95 and playing here only because of Pietersen's absence - kept England hopes alive of pulling off a ground and team record fourth-innings chase.

It seemed all realistic chance had gone with the mid-afternoon elimination of fifth-wicket pair Trott and Bairstow. But Prior, Stuart Broad and Graeme Swann would not go quietly either.

The wicketkeeper-batsman, England's top runscorer from number seven in this three-match series, dug in against his free-flowing instincts in the early stages of his 107-ball 50.

But he upped the ante expertly, with the tail - and as long as he remained, so too did English hope. Bairstow, and then Trott, had gone in the space of nine overs for the addition of only 12 runs - and at 146 for six, England seemed sure to fall well short.

But that was reckoning without Broad and Prior, who responded with a stand of 62 until the former went just before tea.

Broad strode out with licence to attack, and did so with some adventurous strokeplay - including a six pulled over square-leg off South Africa's pace spearhead Dale Steyn.

When he mis-hooked a Jacques Kallis bouncer down to long-leg, where Hashim Amla set himself to complete a low catch, it seemed England were surely once and for all running out of batsmen.

Prior and Swann would not hear of that suggestion, launching a calculated yet frenetic assault before the second new ball - which brought 60 runs in seven overs, in their partnership of 74.

Sweeps and reverse-sweeps came thick and fast off Tahir, and Swann also dispatched the leg-spinner over wide long-on for six, before failing to make his ground at the non-striker's end after being called through for a sharp single to short third-man.

England had lost Ian Bell, and James Taylor to a calamitous run-out, before lunch.

Bell succumbed when Philander (five for 30), also responsible for both wickets last night, had him edging to a juggling Graeme Smith at first slip.

Trott registered England's first boundary, an edge high over the slips off Philander, from the first ball of the 17th over.

He was joined by Taylor, who came through the remainder of Philander's spell unscathed - only to be run-out when Trott clipped Steyn to wide long-on and then sent his partner back for an attempted fourth run.

Had Jacques Rudolph clung on to a half-chance, high to his right at third slip off Kallis, Trott would have gone for 33 - and England would have been 57 for five.

Instead, Bairstow injected youthful intent as he and Trott took England past lunch.

They bagged some boundaries too, Bairstow under way with a rush of four from eight deliveries off Steyn and then taking two from the first two balls he received at the start of Tahir's spell - clubbing the leg-spinner down the ground and sweeping him fine.

Trott had time just before lunch to complete his near three-hour 50 when he nudged Tahir into the off-side for a scampered two, and Bairstow passed his half-century from only 41 balls - clipping Philander fine for his eighth four.

England needed much more of the same, though, and did not get it from Bairstow - who went fatally back to Tahir and was bowled by a leg-break that kept low.

Steyn then returned from the pavilion end and, with his very first delivery, produced a beauty to have Trott very well-caught high to his left at second slip by Kallis.

The story of a titanic tussle appeared likely to be done already.

That, of course, was far from the case - to the cheers of a partisan and ever-growing crowd. But in the end, they and their team were to be disappointed.