Heinrich Klaasen and David Miller hit unbeaten half-centuries to set up a nine-run win for South Africa in a rain-reduced opening one-day international against India on Thursday.

The left-handed Miller (75) and Klaasen (74) put on an unbeaten stand of 139 runs after the tourists lost their top four in the 40-overs-a-side match in Lucknow.

The bowlers led by Lungi Ngidi then kept down India to 240-8 despite Sanju Samson's unbeaten 86 off 63 balls as South Africa took a 1-0 lead in the three-match series.

The Proteas keep themselves in the hunt for a direct entry into next year's 50-over World Cup with crucial Super League points of offer for the 11th ranked ODI side.

The top eight teams (seven and hosts India) get a direct qualification to the league stages of the 2023 World Cup.

Klaasen and Miller rebuilt the innings at a venue that witnessed a lot of rain for two days before play started Thursday afternoon and took the attack to the opposition.

Miller, who amassed 125 runs including a century in the three-match Twenty20 series which South Africa lost 2-1, reached his 18th ODI fifty.

Klaasen followed his partner to a fifty in the same over and the two changed gears with some luck from the fielders as Mohammed Siraj dropped Klaasen on 64.

South Africa started steadily after being put into bat first before losing their way to 71-3.

But Quinton de Kock stood firm to make 48 before departing and Miller and Klaasen then stood unconquered.

In reply, India lost regular wickets to be reduced to 51-4 including Shubman Gill bowled by Kagiso Rabada for three and skipper Shikhar Dhawan out for four off Wayne Parnell.

Shreyas Iyer and Samson put on 67 runs in their attempt to bring alive the chase as the pair got a few boundaries against the disciplined South African attack.

Iyer, who scored his third half-century in the four ODI innings, reached his 50 in 33 balls but got out four balls later to Ngidi.

Samson, who got his T20 best after surpassing his previous top of 54, stood firm with Shardul Thakur and took on the bowlers in a 93-run stand and raised his second ODI fifty.

Thakur took the cue and smashed Rabada for two straight fours including a scoop over short fine-leg in a 14-run 37th over but got out in the next over to Ngidi, who returned figures of 3-52.

India have picked a second-string team after their Twenty20 side, led by Rohit Sharma, on Thursday left for the World Cup in Australia which begins later this month.