Janneman Malan responded to his calamitous start to one-day cricket by making a match-winning century in the second game on Wednesday, leading South Africa to a six-wicket win over Australia and a series victory.

The opening batsman was out first ball of the game on his ODI debut in the series opener on Saturday.

More Images
Australia's bowler Pat Cummins, right, reacts after dropping a catch off South Africa's batsman Heinrich Klaasen during the second One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)

Janneman Malan responded to his calamitous start to one-day cricket by making a match-winning century in the second game on Wednesday, leading South Africa to a six-wicket win over Australia and a series victory.

Australia's bowler Adam Zampa, second left, celebrates with teammates after dismissing South Africa's batsman Heinrich Klaasen for 51 runs during the second One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)

David Miller (37 not out) added the finishing touch with a drive for four through the covers to give South Africa an unassailable 2-0 lead in the three-match series.

South Africa's batsman Heinrich Klaasen, right, plays a shot as Australia's wicketkeeper Alex Carey watches on during the second One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)

He put on a 91-run partnership with Jon-Jon Smuts (41), 81 with Heinrish Klaasen (51) and then an unbroken stand of 90 with Miller to see South Africa home.

Australia's batsman Mitchell Starc plays a reverse swing during the second One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)

That 6-58 was also a career-best performance from Ngidi.

Australia's batsman Pat Cummins plays a high ball from South Africa's bowler Anrich Nortje during the 2nd One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)

Australia's batsman Pat Cummins plays a high ball from South Africa's bowler Anrich Nortje during the 2nd One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)

South Africa's Keshav Maharaj, right, falls on the ground as he attempt a catch off Australia's batsman D'Arcy Short during the 2nd One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)

South Africa's Keshav Maharaj, right, falls on the ground as he attempt a catch off Australia's batsman D'Arcy Short during the 2nd One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)

South Africa's batsman Janneman Malan plays a shot during the second One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)

South Africa's batsman Janneman Malan plays a shot during the second One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)

South Africa's bowler Lungi Ngidi reacts after his delivery during the 2nd One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)

South Africa's bowler Lungi Ngidi reacts after his delivery during the 2nd One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)

Australia's bowler Ashton Agar attempt a catch off his own bowling during the second One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)

Australia's bowler Ashton Agar attempt a catch off his own bowling during the second One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)

Australia's bowler Adam Zampa bowls during the second One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)

Australia's bowler Adam Zampa bowls during the second One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)

Malan fared much better on his second go, hitting 129 not out to bat through the innings at Mangaung Oval in Bloemfontein and see South Africa past the target of 272. South Africa finished on 274-4 with nine balls to spare after Australia chose to bat first and made 271 all out.

Australia's bowler Pat Cummins, right, reacts after dropping a catch off South Africa's batsman Heinrich Klaasen during the second One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)

Australia's bowler Pat Cummins, right, reacts after dropping a catch off South Africa's batsman Heinrich Klaasen during the second One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)

David Miller (37 not out) added the finishing touch with a drive for four through the covers to give South Africa an unassailable 2-0 lead in the three-match series.

But it was Malan's maiden century, and 6-58 earlier from fast bowler Lungi Ngidi, that secured South Africa's first series win of its home season. This year, the Proteas have lost test and T20 series to England — the ODI series was drawn — and also lost a T20 series against Australia.

Malan, whose brother made his test debut this year, had regular help from his teammates in South Africa's run chase.

Australia's bowler Adam Zampa, second left, celebrates with teammates after dismissing South Africa's batsman Heinrich Klaasen for 51 runs during the second One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)

Australia's bowler Adam Zampa, second left, celebrates with teammates after dismissing South Africa's batsman Heinrich Klaasen for 51 runs during the second One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)

He put on a 91-run partnership with Jon-Jon Smuts (41), 81 with Heinrish Klaasen (51) and then an unbroken stand of 90 with Miller to see South Africa home.

For Australia, captain Aaron Finch made 69 and D'Arcy Short also scored 69, but the Aussies came undone in the last 10 overs of their innings when they made just 49 runs and lost six wickets.

Ngidi took three of those last six wickets and also rocked Australia early with the dismissals of Steve Smith (13) and Marnus Labuschagne off successive balls in the 13th over.

South Africa's batsman Heinrich Klaasen, right, plays a shot as Australia's wicketkeeper Alex Carey watches on during the second One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)

South Africa's batsman Heinrich Klaasen, right, plays a shot as Australia's wicketkeeper Alex Carey watches on during the second One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)

That 6-58 was also a career-best performance from Ngidi.

More AP sports: https://apnews.com/apf-sports and https://twitter.com/AP_Sports

Australia's batsman Mitchell Starc plays a reverse swing during the second One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)

Australia's batsman Mitchell Starc plays a reverse swing during the second One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)

Australia's batsman Pat Cummins plays a high ball from South Africa's bowler Anrich Nortje during the 2nd One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)

Australia's batsman Pat Cummins plays a high ball from South Africa's bowler Anrich Nortje during the 2nd One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)

South Africa's Keshav Maharaj, right, falls on the ground as he attempt a catch off Australia's batsman D'Arcy Short during the 2nd One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)

South Africa's Keshav Maharaj, right, falls on the ground as he attempt a catch off Australia's batsman D'Arcy Short during the 2nd One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)

South Africa's batsman Janneman Malan plays a shot during the second One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)

South Africa's batsman Janneman Malan plays a shot during the second One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)

South Africa's bowler Lungi Ngidi reacts after his delivery during the 2nd One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)

South Africa's bowler Lungi Ngidi reacts after his delivery during the 2nd One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)

Australia's bowler Ashton Agar attempt a catch off his own bowling during the second One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)

Australia's bowler Ashton Agar attempt a catch off his own bowling during the second One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)

Australia's bowler Adam Zampa bowls during the second One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)

Australia's bowler Adam Zampa bowls during the second One Day International cricket match between South Africa and Australia at Managing Oval in Bloemfontein, South Africa, Wednesday, March 4, 2020. (AP PhotoThemba Hadebe)