Jason Roy's magnificent century was in vain as a hostile spell from Anrich Nortje inspired South Africa to a dramatic 27-run win over England in the first match of the ODI series.

With little margin for error as the Proteas battle to qualify for this year's World Cup in India, Rassie van der Dussen made a brilliant 111 and David Miller 53 as the hosts posted 298-7 at Mangaung Oval on Friday.

Jofra Archer (1-81) was expensive on his long-awaited international return in Bloemfontein, where Sam Curran (3-35) was the pick of the England bowlers.

Roy struck a sublime 113 from 91 balls, combining with Dawid Malan (59) for an opening stand of 146, but the world champions collapsed to 271 all out to go 1-0 down.

Paceman Nortje claimed 4-62, while Sisanda Magala (3-46) and Kagiso Rabada (2-46) also played a big hand as the tourists capitulated and South Africa made a great start to the three-match series with so much at stake.

Captain Temba Bavuma (36 off 28 balls) and Quinton De Kock (37 off 41) put on 61 for the first wicket before both were both sent packing by Curran.

Van der Dussen and Miller added 110 for the fifth wicket, the number three pacing his knock superbly, with Archer given the treatment in his first England match for almost two years.

It had looked like being a procession for England when South Africa-born Roy and Malan got them off to a flyer, only for the latter to strike a Magala bouncer high in the air for Bavuma to take.

Magala also removed ODI debutant Harry Brook after Nortje saw the back of Ben Duckett, but Roy raced to his hundred in only 79 balls as the boundaries flowed.

England were 196-4 in the 30th over when Rabada dismissed Roy and Jos Buttler kept them ticking along with a patient 36, but they crumbled after Nortje had the skipper caught behind in a brilliant spell.

Tabraiz Shamsi sealed a stunning win by getting Olly Stone caught and bowled in the 45th over.

Roy returns to form in spectacular fashion

Opener Roy was left out of England's T20 World Cup-winning squad last year, but he showed what he is capable with a powerful knock that included 11 fours and four sixes.

He has now passed the 4,000-run milestone for England in ODIs with 4,106 in total. Among England batters, only Joe Root (91 innings) reached that mark in quicker time than Roy's 105 innings.

Rapid Nortje burst decisive

Van der Dussen was outstanding with the bat as he ensured South Africa posted an imposing total, but it did not look like being enough as England appeared to be cruising to victory.

That was until the rapid Nortje came to the fore with a brilliant spell, taking 3-14 in four overs to turn the tide and rock England. Buttler, David Willey and Archer – out for a duck on his return – all fell to the fired-up fast bowler, who totally changed the game.