(CNN) -- Graeme Swann and Jimmy Anderson led a fight back by England with a record ninth wicket stand of 106 to leave the opening Test against South Africa at Centurion in the balance with two days to go.
Their batting heroics limited England's first innings deficit to 62 runs and Anderson then struck with the ball to leave South Africa nine for one wicket at stumps on the third day in Pretoria.
South Africa had a stranglehold on the match as England slumped to 242 for eight wickets in reply to their 418, but Swann changed the course of the match with a swashbuckling 85 off just 81 balls.
He found fine support from Anderson, who made 29 before Makhaya Ntini made amends for some loose bowling with the second new ball by having him caught by Morne Morkel after a mistimed drive.
Swann, who was closing on his first Test century, went soon afterwards as he holed out in the deep to slow left-armer Paul Harris, who led the home attack with five wickets for 123.
"It's going quite well at the minute. I've got my way of playing and I've got free license from the dressing room to do that," Swann told Sky Sports.
"Today was one of those days where everything I tried came off and it's got us back in a good position."
Anderson removed opener Ashwell Prince, who played on for a duck, with South African captain Graeme Smith and nightwatchman Harris batting to the close.
England will look to take quick wickets on the fourth day to boost their victory hopes, while the Proteas will want to build a big lead to leave themselves time to dismiss the tourists in their second innings.
South Africa were on top for much of the third day with England losing wickets at regular intervals as no batsman bar Swann scored fluently.
On a pitch of variable bounce, England captain Andrew Strauss added just two runs to his overnight score before a shooter from Ntini bowled him for 44.
His overnight partner Jonathon Trott also struggled and was eventually bowled by Harris for a stodgy 28.
Kevin Pietersen played well for his 40, but he edged a Morkel delivery onto his stumps before England's middle order collapsed, losing their next three wickets for 32 runs, all to Harris.
Ian Bell was bowled for five, leaving a delivery which hit his middle and off stumps, Matt Prior top-edged a sweep to Friedel de Wet at fine-leg for four and Paul Collingwood edged to Jacques Kallis at slip for 50.
Stuart Broad kept Swann company in the early play after tea, but he went when JP Duminy had him trapped leg before wicket, the decision being referred to the TV umpire after a considerable delay.
Replays showed Broad to be plumb lbw for 17, but he was unhappy about the delay in referral and exchanged words with both umpires before leaving the pitch.
But any disappointment England felt about his dismisal was lifted by the contribution of Swann, who took five wickets in South Africa's first innings, and Anderson.