South Africa 289 for 7 (Erwee 73, Jansen 41*; Stokes 3-53) lead England 165 (Pope 73, Rabada 5-52, Nortje 3-63) by 124 runs
London: England are clinging on in the first Test against South Africa after a Ben Stokes-inspired fightback on day two at Lord's.
South Africa opener Sarel Erwee, with 73, was the first to put the Proteas in a commanding position, a lead of 27 with seven first-innings wickets in hand.
But Stokes bounced out Erwee, then had Rassie van der Dussen lbw as part of a South Africa slide from 160-2 to 210-6.
The rot was stopped by Marco Jansen and Keshav Maharaj, who shared a vital partnership of 72 from only 75 balls.
With England looking tired and the game slipping away, Stokes had Maharaj hook to Matthew Potts for 41, leaving Jansen unbeaten on 41 and South Africa 289-7, an advantage of 124.
England had earlier been bowled out for 165, with Ollie Pope out for 73.
Pope was the first of three wickets to fall to Kagiso Rabada, the pace bowler sublime in claiming 5-52.
The day that Lord's was splashed with red for the Ruth Strauss Foundation was perhaps the most attritional of England's new era.
South Africa had the better of the majority of it, and would already be out of sight had it not been for Stokes.
The Proteas were helped by the inconsistency of an England attack that looked rusty - neither James Anderson nor Stuart Broad have played since the win over India at the start of July, despite having opportunities in the County Championship and for the England Lions.
With the movement on offer, there were times when the bowling on Thursday was more disappointing than the batting struggles on Wednesday.
Stokes tried everything he could as captain - he kept five slips in place for long periods - but it was with the ball where he made the crucial impact.
Still, the Jansen-Maharaj partnership was incredibly damaging to England and has left them with little room for error.
The home side are not out of this Test, but must make full use of a second new ball that will be available after three overs on the third morning.
Earlier, Any hope that England had of pushing their overnight 116-6 towards 200 rested on Pope, who began the day on 61.
Pope was dropped by first slip Erwee off Rabada in the opening over and, when he dragged a loose drive at the same bowler on to his stumps, South Africa surged.
Rabada was magnificent, swinging the ball, but also cleverly deceiving Broad with a slower ball. After Jansen bowled a swiping Leach, Rabada trapped Anderson lbw to earn a place on the Lord's honours board for the first time.
Despite mustering such a meagre total, England would have felt in the game because of the helpful bowling conditions.
That hope was tested by Erwee, Jansen and Maharaj, but Stokes kept his side in contention.