|Swann launches one to the rope [EPA]
Graeme Swann scored a fighting 85 to become the highest-scoring England number nine in 38 years and steer a stuttering England to 356 all out - just 62 runs behind South Africa's first innings in Centurion.
England lost a tranche of wickets after starting day three on 88-1, captain Andrew Strauss falling early before Kevin Pietersen and a Paul Collingwood 50 held up the order.
But Ian Bell fell cheaply and it was left to Swann - who took five wickets in South Africa's first innings - to form a century partnership with James Anderson to give England a chance of at least saving the match.
In reply South Africa fell to 2-1 as Anderson claimed Ashwell Prince for a duck.
South African left-arm spinner Paul Harris had taken five for 123 and was called into action as a batting nightwatchman, guiding the hosts to nine for one alongside captain Graeme Smith at the close on Friday.
The Proteas would have expected a bigger lead with the tourists on 242-8 when Stuart Broad was out shortly after tea.
But a stand of 106 runs in 23 overs for the ninth wicket between Swann and Anderson held the home side up for 104 minutes in the final session.
Swann showed up his cautious top-order teammates, getting his runs off only 81 balls.
Despite taking the second new ball, South Africa struggled to break up the ninth-wicket pair which hit freely against a wayward Makhaya Ntini and Morne Morkel.
South Africa captain Graeme Smith brought back spinner Harris, who had already taken four wickets, after only seven overs with the second new ball.
South Africa first innings 418
England first innings (o/n 88-1)
A Strauss b Ntini 46
A Cook c Boucher b De Wet 15
J Trott b Harris 28
K Pietersen b Morkel 40
P Collingwood c Kallis b Harris 50
I Bell b Harris 5
M Prior c De Wet b Harris 4
S Broad lbw b Duminy 17
G Swann c Smith b Harris 85
J Anderson c Morkel b Ntini 29
G Onions not out 4
Total (all out; 104 overs) 356
FoW 1-25 2-98 3-119 4-168 5-189 6-211 7-221 8-242 9-348 10-356
South Africa second innings
A Prince b Anderson 0
G Smith not out 6
P Harris not out 2
Total (for 1, four overs) 9
But the tall left-armer was also punished.
Swann hit him onto the grass bank at midwicket to bring up the 50 partnership off only 62 balls.
Swann also hit Ntini for six to square-leg earlier in his innings, and played shots all around the wicket, even switch-hitting with success on two occasions, hitting 10 fours and two sixes.
The partnership, the biggest of the England innings, was eventually broken when Ntini induced Anderson to offer a catch to a diving Morkel with the score on 348.
The innings ended 11 balls later when Swann was caught at deep mid-wicket by Smith to give Harris figures of 5-123 in the innings.
Ntini finished with 2-78.
England started the day's second session on 143-3, but Harris led the charge to reduce the tourists to 238-7 by tea.
The first wicket to fall after lunch was that of Pietersen, who edged a Morkel delivery onto his stumps on 40.
England lost their next three wickets for 32 runs, all to Harris.
Bell was bowled for five, Matt Prior top-edged a sweep to Friedel de Wet at fine-leg for four scored off 34 balls, and Collingwood edged
to Jacques Kallis at slip.
In the first session, Ntini snared the vital wicket of England captain Strauss six overs into the day.
Ntini, in his 100th Test, bowled the left-hander for 46 after England had added 10 runs to their overnight tally of 88-1.
The Proteas received another boost when Harris bowled Jonathan Trott for 28 half-an-hour before lunch, and England reached the end of the first session on 143 for three wickets.
Source: Al Jazeera and agencies