The 32-year-old, who succeeded Graeme Smith as permanent skipper in July 2014, left the role having led his team in 14 Tests, winning four, drawing four and losing six.

Amla, who cited the need to "work on my own game", will be replaced as captain by AB de Villiers for the final two Tests.

Amla's 707-minute 201 in South Africa's first innings was one of the reasons a draw was always the likely result after four days dominated by the bat on a flat Newlands wicket.

But England made hard work of it, as the loss of early wickets gave South Africa hope of levelling the series after the tourists' victory in the first Test in Durban.

England's collapse

Joe Root added 29 to the 50 he scored in the first innings before being bowled by Chris Morris

For the first time in the match, cloudy conditions in the morning offered something for the bowlers - and the home side took advantage.

Captain Alastair Cook was the first to go, feathering his second ball from Kagiso Rabada down the leg side and into the gloves of Quinton de Kock.

He was soon followed by fellow opener Alex Hales, brilliantly caught one-handed at third slip by the diving Chris Morris off Morne Morkel.

Cook's eight means he has now scored just 42 runs in his four innings so far this tour, while Hales' dismissal further highlights his fallibility outside off stump.

Joe Root and Nick Compton rallied slightly, adding 36 for the third wicket, but both fell as they were gaining momentum - the former bowled by Morris for a run-a-ball 29 before the latter chipped spinner Dane Piedt to short mid-on to depart for 15.

After smashing a record-breaking 258 from 198 balls in the first innings, Stokes was required to demonstrate a more disciplined side to his game along with Taylor, but both fell to Piedt in quick succession - Stokes misjudging a sweep to Morkel at deep mid-wicket and Taylor gloving a rising delivery to Temba Bavuma at short-leg.

Key contribution

The depth to which England bat was their salvation, chiefly in the shape of Bairstow, who followed his 150 not out in the first innings with an unbeaten 30 during a stand of 43 with the equally resolute Moeen (10 not out).

The partnership was not without its scares, most notably a stumping of Bairstow off spinner Dean Elgar, over which the video umpire took an age before deciding the Yorkshire player had made his ground by a toe's length.

Having survived to tea, during which light rain briefly fell, the pair were only required to bat six overs of the evening session before bad light brought an early end to the match, with 59 eventful overs bowled in the day.

Jonny Bairstow was on 20 when he survived the close stumping

Analysis

Former England batsman Geoffrey Boycott on BBC Test Match Special: "South Africa have confidence now and England have a contest on their hands in Johannesburg.

"Hales looks extremely vulnerable outside off stump, he got caught on the crease and was eventually out. And Dale Steyn could come back if he's fit, and he's even better than Morkel.

"The catching is the worst aspect for England. They perhaps just need to treat this as a bad match for catching and hope to do better in the next Test. I don't think they can do much with their team, but the top order needs to be better."

'A little bit nervous' - what they said

Alastair Cook: "It was a little bit nervous. It's amazing when only one side can win it, the pressure is all on one side. South Africa bowled well. It would have been really disappointing not to bat out the day.

"On the first day it was a really good cricket wicket, but the pace slowly died. The partnership between Stokes and Bairstow accelerated the game. It was outstanding, a privilege to watch.

Media playback is not supported on this device

Missed chances 'frustrating' - England captain Cook

"The bowlers put the ball in really good areas. We played against some really good batting. To get 600 when you have conceded 600 is a really good effort from them. It might have been different had we taken our chances."

Hashim Amla: "It was nice to get some runs again. It's one of the best places in the world to play and we were pleased to see so many supporters here.

"Bavuma's innings was exceptional. He's been under pressure with people doubting his place in the team, but he's got real talent and we're all pleased the way he showed that.

"The next two matches should be really exciting. Both teams are evenly matched but we've got more positives to take into the next match."