Dom Sibley is the first England opener to score a century at Newlands since Jack Hobbs in 1910

Second Test, Newlands, Cape Town (day four of five): England 269 & 391-8 dec: Sibley 133*, Stokes 72, Root 61 South Africa 223 & 126-2: Malan 63* South Africa need 312 runs to win Scorecard

England need eight wickets for victory on the final day of the second Test in Cape Town after being frustrated by South Africa's top order.

Dom Sibley made 133 not out - his maiden Test ton - and Ben Stokes hit 72 as England declared on 391-8 to set the Proteas a Test record 438 to win.

Joe Denly removed opener Dean Elgar for 34 and Zubayr Hamza fell for 18 to James Anderson in the penultimate over.

But Pieter Malan remained unbeaten on 63 as South Africa closed on 126-2.

Anderson's late strike provided England a welcome boost on a Newlands pitch not offering as much variable bounce as England would have hoped for by now.

They will still have to work hard and stay patient to secure victory, but have time and runs to play with, given the hosts require a further 312 to win.

Sibley and Stokes in stunning contrast

Ben Stokes hit seven fours and three sixes in his entertaining innings

Resuming on 85, Sibley made careful progress towards his century, reaching the mark off 269 balls in the 14th over of the day with a firm sweep off Keshav Maharaj for four.

After removing his helmet to acknowledge the crowd and embrace Stokes, the Warwickshire batsman settled straight back into his task, padding away, leaving and waiting for the bad ball.

By stark contrast, Stokes - dropped on 38 by Quinton de Kock at full stretch as he ran towards square leg - had already smashed his way to a 34-ball half-century by the time Sibley reached three figures.

It was stunning onslaught by the all-rounder, hitting Maharaj down the ground, reverse-sweeping medium pacer Dwaine Pretorius and crashing anything over-pitched through the covers before he finally holed out at long-on.

Stokes' thrilling knock took the game completely away from South Africa at a stirring pace and was made possible by Sibley's patient accumulation, providing a glimpse of how England may have been able to bat with a more reliable top order in recent years.

Jos Buttler hit two sixes in a brisk 23 and Sibley also showed more invention with a few reverse sweeps before captain Joe Root finally called his side in 20 minutes after lunch.

Resilient South Africa hold firm

Pieter Malan is unbeaten on 63 off 193 balls

Anderson and Stuart Broad bowled a decent opening spell but Malan and Elgar left well and kept rotating the strike to repel England's premier duo.

Both also used their feet well when off-spinner Dom Bess was introduced early and Root had to turn to the part-time leg-spin of Denly to break an opening stand of 71.

Targeting the rough outside Elgar's off stump, Denly drew the left-hander forward and induced a very thin edge through to Buttler, with a small spike on UltraEdge meaning the decision was not overturned after a bemused Elgar called for a review.

England remained patient but were matched by South Africa, with impressive debutant Malan steadily bringing up his maiden Test half-century off 146 balls.

Stokes was saved until the 40th over and tested both batsmen with quick, short-pitched bowling, drawing a few false shots from Hamza, but without success.

Anderson was duly given one last burst and England's all-time highest Test wicket-taker delivered, finding reverse swing to move the ball away from Hamza, who nicked to Buttler and perhaps ease any nerves.

Nightwatchman Maharaj survived Sam Curran's final over and will hope to survive for as long as possible on Tuesday before South Africa's key batsman and captain Faf du Plessis starts his innings.

'That feeling is pretty addictive' - what they said

England's Dom Sibley told BBC Sport: "I've dreamed millions of times about scoring a hundred for England and that was better than I'd dreamed. To do it at Newlands, in front of this crowd, was amazing - an amazing moment.

"The hard work was done yesterday and the topping was today.

"It's going to be hard graft tomorrow. Getting that second wicket tonight was a massive bonus. It gives us a boot of energy and we're excited to get going tomorrow to try and win this Test."

Cricket correspondent Jonathan Agnew: "Credit to South Africa. It has been very interesting day. England completely bossed the first half of it and South Africa blunted the second.

"I would be amazed if South Africa got 438 - it would need De Kock to go berserk. England are favourites because we know there's not much to come after Philander. A draw wouldn't be too far out.

"England are going to have to start tomorrow with a bang. What they must not do is really go out searching for wickets. You've got to relax and bowl. All the pressure is on the batsmen."

South Africa batsman Dean Elgar on Sky Sports: "The game is evenly poised. It can go either way at the moment.

"The wicket is playing nicely. We need two or three guys to grind it out. We have batters in the shed who can do that. We have to start well."

Former England batsman Michael Carberry on The Cricket Social: "Malan has looked very assured. His judgement outside off stump has been superb. He has done the job necessary for the team. He is going to have to play a major knock for South Africa to save this game."