An unbeaten 72 from Jonny Bairstow rescued England after their top order collapsed on day two of the second Test against South Africa.
The hosts looked in deep trouble when they were reduced to 4-54 at Lord's, before Bairstow and Ian Bell (58) combined for a vital 124-run partnership on Friday.
Bairstow, playing just his fourth Test, remained unbeaten at stumps as England reached 5-208 in response to South Africa's 309.
South Africa had earlier added 47 runs to their overnight total as paceman Steve Finn (4-75) collected his fourth scalp to end up the pick of the England bowlers.
After making a solid start with the bat, England lost captain Andrew Strauss - in his 100th Test - just before lunch.
Morne Morkel (2-53) clean bowled Strauss to leave the hosts, needing a win to retain their number one ranking, at 1-29.
Jonathan Trott (eight) fell at the hands of speedster Dale Steyn (2-48) for the third time this series after a review from Graeme Smith led to him being given out LBW.
Alastair Cook had remained patient as he lost two partners, but a loss of concentration cost him his wicket and left England at 3-39.
The left-hander uncharacteristically chased a full and wide delivery from Steyn, edging to second slip where Jacques Kallis took a good catch.
The tourists got further reward for their tight bowling when Morkel removed James Taylor to have England reeling at 4-54, the same score South Africa were on when Kallis fell on day one.
But just as Smith's men did a day earlier, England rallied - and it was thanks to the patient Bell and classy Bairstow, who struck nine fours in his 72.
Vernon Philander claimed the big wicket of Bell (58 off 157 balls), drawing the right-hander into an edge to Alviro Petersen at third slip.
Bairstow and Matt Prior survived through to stumps as England recovered after a poor start to be 101 runs behind heading into day three.