The hosts won the toss and elected to bat, posting 298 for seven, their total boosted by 111 from Rassie van der Dussen, before restricting England to 271 all out in their reply.
The visitors raced to 146 without loss in the 20th over as they bludgeoned the home bowling attack to all parts of the ground but when Dawid Malan (59) was the first wicket to fall, there was a stutter in England’s chase.
They were largely undone by poor shot selection at the back end of the innings when calm heads would have seen them comfortably home, losing 10 wickets for the addition of 125 runs following the massive opening stand.
🚨 RESULT | SOUTH AFRICA WON BY 27 RUNSA remarkable fightback in the middle overs, led by Anrich Nortje (4/62) and… https://t.co/eWxX89XChG
— Proteas Men (@ProteasMenCSA) 1674845824000
“Disappointed, we played some excellent cricket for the majority of the game,” England captain Jos Buttler said.
“To have that conviction and commitment to keep taking it on has served us well for a long time. We are disappointed we did not go on and win.”
Roy, who has battled with the bat in recent months, reached his 11th ODI century off 79 balls to keep the scoreboard moving as wickets fell at the other end, while Buttler chipped in with 36 but could not see his side to victory.
South Africa’s innings was anchored by the 111 off 117 balls from middle-order batsman Van der Dussen, who completed a fourth ODI century. He was supported by David Miller (53) as the pair put on 110 for the fifth wicket.
Seamer Sam Curran was the pick of England’s bowlers with 3-35 from his nine overs, but it was a day to forget for fast bowler Jofra Archer, with 1-81 in his 10 overs.
It was his first ODI in almost two years after two elbow operations and a stress fracture in his back.
The result is a boost for South Africa, who need a clean sweep of the series to stay on course for guaranteed qualification for the World Cup in India later this year.
The second match in the three-game series will be played at the same venue on Sunday.