South Africa were 145 for 3 in their 2nd innings, leading England by just 139 runs after day three.
London: The third Test between England and South Africa remains finely poised as the touring side reached 145 for 3 at stumps on day three on Saturday, for a lead of 139 after a pulsating third day at Lord's.
Hashim Amla, who was dropped on 2 by Matt Prior off Stuart Broad, is 57 not out in a Test the visitors only need to draw to secure the 1-0 series win that would see them replace England as the world's top-ranked Test side.
An 81-run stand between Amla and Jacques Kallis threatened to take the game away from England, but Steven Finn, who has 1 for 28, kept the hosts' hopes alive when he had Kallis lbw for 31 in the 47th over.
Earlier, South Africa dismissed England for 315, after a last-wicket stand of 32 by Graeme Swann, who made 37 not out, and Steven Finn with 10 had given the hosts a slender first-innings lead of six runs.
Jonny Bairstow fell five runs short of a maiden Test century, with a knock of 95 from 196 balls that included 13 fours, before he was bowled by Morne Morkel.
Morkel finished with figures of 4 for 80 while Dale Steyn took 4 for 94.
Resuming on 208 for 5, England survived for half an hour until Matt Prior fell to the first delivery with the new ball, from Vernon Philander.
Prior's dismissal squandered a promising start by England. Having reached 27 he was needlessly aggressive against the new ball and slashed Philander straight to Kallis at second slip.
Broad played fluently but was out for 16, fending a Steyn delivery to Amla at short leg.
It might have been worse for England, but Swann successfully referred an lbw decision when he was on 12 and replays showed Steyn's delivery would have passed over the stumps.
Bairstow's innings had almost ground to a halt once he'd entered the 90s. After a tortuous spell of 45 minutes he failed to score from 15 straight balls from Morkel, the last of which crashed into the off and middle stumps.
The capacity crowd nevertheless gave the 22-year-old batsman a standing ovation as he walked off.
James Anderson was out to the sixth ball of the afternoon session, caught off Steyn by Jacques Rudolph, but Steven Finn brilliantly pulled the same bowler for four to take England past 300.
Cheers greeted both the single Swann took from Steyn to level the scores and the single Finn took from the next ball to nose England ahead and there was a roar when Smith dropped Swann after he edged Philander to first slip.
It was an easy chance, but in the next over Finn was out for 10, when JP Duminy took a looping catch at point, handing Morkel his fourth wicket.
England's desperation for an early wicket saw captain Andrew Strauss waste a referral when a Swann delivery missed Smith's edge when the South African captain was on 14 in the 18th over.
Four overs later Swann made the breakthrough, this time trapping Smith lbw, but a potentially crucial chance was missed when Prior dropped a difficult one-handed catch to dismiss Hashim Amla for 2 when he flicked Broad down the leg side in the 25th over.
Although Broad dismissed Alviro Petersen lbw for 25 two balls later, dropping a batsman of Amla's class was always likely to hurt England.
Swann - who bowled 20 overs without a rest - had three lbw appeals turned down by umpire Kumar Dharmasena in the 38th over, all of them correctly.
The game was drifting away from England until Kallis fell 15 minutes before the close, a decision he unsuccessfully referred.
In a raucous atmosphere, nightwatchman Dale Steyn batted through to stumps and Amla brought up his 50 when he drove Broad through mid off for four in the final over.