Dwaine Pretorius made the most of a promotion to No. 3 in the batting order to hit 77 not out in the third Twenty20 and lead South Africa to a 45-run win under the Duckworth-Lewis method and a 3-0 series sweep over Sri Lanka on Sunday.

Allrounder Pretorius was given his chance in the series-ender with South Africa, already 2-0 up, resting some players and missing others to IPL duty. He seized it in his first innings in a T20 international, striking seven fours and three sixes in his 42-ball innings and leading South Africa to 198-2 in its 20 overs.

More Images
South Africa's Reeza Hendricks fielding a ball during the T20I match between South Africa and Sri Lanka at Wanderers Stadium in Johannesburg, South Africa, Sunday, March, 24, 2019. (AP PhotoChristiaan Kotze)

Dwaine Pretorius made the most of a promotion to No. 3 in the batting order to hit 77 not out in the third Twenty20 and lead South Africa to a 45-run win under the Duckworth-Lewis method and a 3-0 series sweep over Sri Lanka on Sunday.

Sri Lanka's captain Lasith Malinga fielding a ball from his own bowling during the T20I match between South Africa and Sri Lanka at Wanderers Stadium in Johannesburg, South Africa, Sunday, March 24, 2019. (AP PhotoChristiaan Kotze)

South Africa's T20 sweep goes with its 5-0 win in the ODI series. Sri Lanka won the one that counted, though, taking the test series 2-0 to become the first team from the Asian subcontinent to win a test series in South Africa.

Sri Lanka's Lasith Malinga(Captain) bowling during the T20I match between South Africa and Sri Lanka at Wanderers Stadium in Johannesburg, South Africa, Sunday, March 24, 2019. (AP PhotoChristiaan Kotze)

Seamer Andile Phehlukwayo finished with 4-24 for South Africa.

South Africa's Dwaine Pretorius playing a shot during the T20I match between South Africa and Sri Lanka at Wanderers Stadium in Johannesburg, South Africa, Sunday, March 24, 2019. (AP PhotoChristiaan Kotze)

South Africa's Dwaine Pretorius playing a shot during the T20I match between South Africa and Sri Lanka at Wanderers Stadium in Johannesburg, South Africa, Sunday, March 24, 2019. (AP PhotoChristiaan Kotze)

South Africa's Dwaine Pretorius playing a shot during the T20I match between South Africa and Sri Lanka at Wanderers Stadium in Johannesburg, South Africa, Sunday, March 24, 2019. (AP PhotoChristiaan Kotze)

South Africa's Dwaine Pretorius playing a shot during the T20I match between South Africa and Sri Lanka at Wanderers Stadium in Johannesburg, South Africa, Sunday, March 24, 2019. (AP PhotoChristiaan Kotze)

South Africa's Andile Phehlukwayo celebrating with his team mates after getting a wicket during the T20I match between South Africa and Sri Lanka at Wanderers Stadium in Johannesburg, South Africa, Sunday, March 24, 2019. (AP PhotoChristiaan Kotze)

South Africa's Andile Phehlukwayo celebrating with his team mates after getting a wicket during the T20I match between South Africa and Sri Lanka at Wanderers Stadium in Johannesburg, South Africa, Sunday, March 24, 2019. (AP PhotoChristiaan Kotze)

Rain stopped play playing a shot during the T20I match between South Africa and Sri Lanka at Wanderers Stadium in Johannesburg, South Africa, Sunday, March, 24, 2019. (AP PhotoChristiaan Kotze)

Rain stopped play playing a shot during the T20I match between South Africa and Sri Lanka at Wanderers Stadium in Johannesburg, South Africa, Sunday, March, 24, 2019. (AP PhotoChristiaan Kotze)

Rain stopped play playing a shot during the T20I match between South Africa and Sri Lanka at Wanderers Stadium in Johannesburg, South Africa, Sunday, March, 24, 2019. (AP PhotoChristiaan Kotze)

Rain stopped play playing a shot during the T20I match between South Africa and Sri Lanka at Wanderers Stadium in Johannesburg, South Africa, Sunday, March, 24, 2019. (AP PhotoChristiaan Kotze)

South Africa's Lutho Sipamla fielding a ball during the T20I match between South Africa and Sri Lanka at Wanderers Stadium in Johannesburg, South Africa, Sunday, March, 24, 2019. (AP PhotoChristiaan Kotze)

South Africa's Lutho Sipamla fielding a ball during the T20I match between South Africa and Sri Lanka at Wanderers Stadium in Johannesburg, South Africa, Sunday, March, 24, 2019. (AP PhotoChristiaan Kotze)

Sri Lanka's chase was interrupted by rain at the Wanderers in Johannesburg but the tourists were well behind the rate by then. Chasing a readjusted target of 183 from 17 overs, Sri Lanka was 137 all out in 15.4 overs.

South Africa's Reeza Hendricks fielding a ball during the T20I match between South Africa and Sri Lanka at Wanderers Stadium in Johannesburg, South Africa, Sunday, March, 24, 2019. (AP PhotoChristiaan Kotze)

South Africa's Reeza Hendricks fielding a ball during the T20I match between South Africa and Sri Lanka at Wanderers Stadium in Johannesburg, South Africa, Sunday, March, 24, 2019. (AP PhotoChristiaan Kotze)

South Africa's T20 sweep goes with its 5-0 win in the ODI series. Sri Lanka won the one that counted, though, taking the test series 2-0 to become the first team from the Asian subcontinent to win a test series in South Africa.

With eyes now on the 50-over World Cup, Pretorius delivered his best limited-overs innings for South Africa, which was put into bat by Sri Lanka, and was supported by 66 from opener Reeza Hendricks. They did the bulk of the work, allowing JP Duminy to swing freely at the end of the innings and connect for two fours and three sixes in his 34 not out from 14 balls.

In Sri Lanka's chase, opener Niroshan Dickwella made 38 and allrounder Isuru Udana 36 but only three Sri Lankans got to double figures.

Sri Lanka's captain Lasith Malinga fielding a ball from his own bowling during the T20I match between South Africa and Sri Lanka at Wanderers Stadium in Johannesburg, South Africa, Sunday, March 24, 2019. (AP PhotoChristiaan Kotze)

Sri Lanka's captain Lasith Malinga fielding a ball from his own bowling during the T20I match between South Africa and Sri Lanka at Wanderers Stadium in Johannesburg, South Africa, Sunday, March 24, 2019. (AP PhotoChristiaan Kotze)

Seamer Andile Phehlukwayo finished with 4-24 for South Africa.

More AP cricket: www.apnews.com/cricket and https://twitter/com/AP_Sports

Sri Lanka's Lasith Malinga(Captain) bowling during the T20I match between South Africa and Sri Lanka at Wanderers Stadium in Johannesburg, South Africa, Sunday, March 24, 2019. (AP PhotoChristiaan Kotze)

Sri Lanka's Lasith Malinga(Captain) bowling during the T20I match between South Africa and Sri Lanka at Wanderers Stadium in Johannesburg, South Africa, Sunday, March 24, 2019. (AP PhotoChristiaan Kotze)

South Africa's Dwaine Pretorius playing a shot during the T20I match between South Africa and Sri Lanka at Wanderers Stadium in Johannesburg, South Africa, Sunday, March 24, 2019. (AP PhotoChristiaan Kotze)

South Africa's Dwaine Pretorius playing a shot during the T20I match between South Africa and Sri Lanka at Wanderers Stadium in Johannesburg, South Africa, Sunday, March 24, 2019. (AP PhotoChristiaan Kotze)

South Africa's Dwaine Pretorius playing a shot during the T20I match between South Africa and Sri Lanka at Wanderers Stadium in Johannesburg, South Africa, Sunday, March 24, 2019. (AP PhotoChristiaan Kotze)

South Africa's Dwaine Pretorius playing a shot during the T20I match between South Africa and Sri Lanka at Wanderers Stadium in Johannesburg, South Africa, Sunday, March 24, 2019. (AP PhotoChristiaan Kotze)

South Africa's Andile Phehlukwayo celebrating with his team mates after getting a wicket during the T20I match between South Africa and Sri Lanka at Wanderers Stadium in Johannesburg, South Africa, Sunday, March 24, 2019. (AP PhotoChristiaan Kotze)

South Africa's Andile Phehlukwayo celebrating with his team mates after getting a wicket during the T20I match between South Africa and Sri Lanka at Wanderers Stadium in Johannesburg, South Africa, Sunday, March 24, 2019. (AP PhotoChristiaan Kotze)

Rain stopped play playing a shot during the T20I match between South Africa and Sri Lanka at Wanderers Stadium in Johannesburg, South Africa, Sunday, March, 24, 2019. (AP PhotoChristiaan Kotze)

Rain stopped play playing a shot during the T20I match between South Africa and Sri Lanka at Wanderers Stadium in Johannesburg, South Africa, Sunday, March, 24, 2019. (AP PhotoChristiaan Kotze)

Rain stopped play playing a shot during the T20I match between South Africa and Sri Lanka at Wanderers Stadium in Johannesburg, South Africa, Sunday, March, 24, 2019. (AP PhotoChristiaan Kotze)

Rain stopped play playing a shot during the T20I match between South Africa and Sri Lanka at Wanderers Stadium in Johannesburg, South Africa, Sunday, March, 24, 2019. (AP PhotoChristiaan Kotze)

South Africa's Lutho Sipamla fielding a ball during the T20I match between South Africa and Sri Lanka at Wanderers Stadium in Johannesburg, South Africa, Sunday, March, 24, 2019. (AP PhotoChristiaan Kotze)

South Africa's Lutho Sipamla fielding a ball during the T20I match between South Africa and Sri Lanka at Wanderers Stadium in Johannesburg, South Africa, Sunday, March, 24, 2019. (AP PhotoChristiaan Kotze)