Jonny Bairstow fell agonisingly short of a maiden Test century on an day of much frustration but some late consolation too for England in their Lord's showdown with South Africa.

Graeme Swann helped to eke out a total of 315 for a six-run first-innings lead, despite Bairstow's departure just before lunch on day three of this third Investec Test.

England then struggled to make inroads with the ball on a scorching afternoon and evening, but Steven Finn's dismissal of Jacques Kallis shortly before stumps kept a titanic contest in the balance as South Africa closed on 145 for three.

Bairstow (95), playing only because England dropped Kevin Pietersen in controversial circumstances, dug the hosts out of trouble yesterday. But he got stuck in the 90s this morning and was bowled playing across the line at Morne Morkel (four for 80).

Bairstow and sixth-wicket partner Matt Prior saw England through the first eight overs of the day to the second new ball, but no further. Prior edged a drive to slip from Vernon Philander's very first delivery after the new ball was taken.

Philander continued to find exaggerated swing against Stuart Broad, but both the new batsman and Bairstow found their scoring opportunities to take England ever closer to South Africa's total until the left-hander fended a ball from Dale Steyn (four for 94) straight to short-leg.

With Bairstow finally gone too, his 196-ball stay including 15 deliveries on 95, it seemed first-innings parity would be beyond the hosts. But Swann had other ideas, and received enough support from numbers 10 and 11 James Anderson and Finn - in a last-wicket stand of 32 - to put England in minor credit.

Graeme Smith and Alviro Petersen comfortably wiped that out by tea, but neither could get significantly further.

Smith was drawn into the sweep against Swann, got his angles wrong and went lbw to a routine off-break; then, after Broad saw Hashim Amla (57no) escape a half-chance on just two off a glove down the leg-side to a diving Prior, he struck two balls later when Petersen missed some inswing and was also lbw.

Two wickets had fallen for only four runs, but Amla was joined by Kallis and they again proved a substantial barrier to England progress, this time with a stand of 81 which ended only when Kallis - much to his dismay after reviewing umpire Simon Taufel's decision in the apparent belief he had hit the ball - became South Africa's third successive lbw departure.