Faf du Plessis stepped down as captain of South Africa's test team on Monday ahead of an expected retirement from international cricket later this year.

Du Plessis quit as test and Twenty20 captain. He had already recently been replaced as one-day captain by Quinton de Kock.

More Images
Faf du Plessis of South Africa leaves the field after losing his wicket during day two of the third cricket test between South Africa and England in Port Elizabeth, South Africa, Saturday, Jan. 18, 2020. (AP PhotoMichael Sheehan)

Faf du Plessis stepped down as captain of South Africa's test team on Monday ahead of an expected retirement from international cricket later this year.

South Africa's captain Faf du Plessis plays a shot on day four of the fourth cricket test match between South Africa and England at the Wanderers stadium in Johannesburg, South Africa, Monday, Jan. 27, 2020. (AP PhotoThemba Hadebe)

The 35-year-old du Plessis had led the test team as permanent captain since late 2016 and was captain in all three formats since 2017. He had stepped in as South Africa captain in a T20 series as early as 2012.

Faf du Plessis of South Africa plays a shot during day four of the third cricket test between South Africa and England in Port Elizabeth, South Africa, Sunday, Jan. 19, 2020. (AP PhotoMichael Sheehan)

In tests, du Plessis will likely play one more series, when South Africa goes to the West Indies for a two-match series in July.

England's bowler Chris Woakes, right, celebrates after dismissing South Africa's captain Faf du Plessis for 3 runs on day two of the fourth cricket test match between South Africa and England at the Wanderers stadium in Johannesburg, South Africa, Saturday, Jan. 25, 2020. (AP PhotoThemba Hadebe)

Between 2016 and early 2018, South Africa won eight of nine test series home and away, beating Australia twice and India during that period. But the last year had been difficult with South Africa's loss of form on the field exacerbated by off-field issues at the national board, which has suspended its CEO amid allegations of mismanagement.

South African captain Faf Du Plessis in action during day five of the second cricket test between South Africa and England at the Newlands Cricket Stadium in Cape Town, South Africa, Tuesday Jan. 7, 2020. (AP PhotoHalden Krog)

Du Plessis is expected to be selected to play as a batsman in home T20 and ODI series against Australia, which start this week.

De Kock, a wicketkeeper-batsman, is the front-runner to also replace du Plessis as captain in tests and T20s. He led South Africa in this month's T20 series against England while du Plessis was rested.

Faf du Plessis of South Africa leaves the field after losing his wicket during day two of the third cricket test between South Africa and England in Port Elizabeth, South Africa, Saturday, Jan. 18, 2020. (AP PhotoMichael Sheehan)

Faf du Plessis of South Africa leaves the field after losing his wicket during day two of the third cricket test between South Africa and England in Port Elizabeth, South Africa, Saturday, Jan. 18, 2020. (AP PhotoMichael Sheehan)

The 35-year-old du Plessis had led the test team as permanent captain since late 2016 and was captain in all three formats since 2017. He had stepped in as South Africa captain in a T20 series as early as 2012.

Du Plessis' decision was not a surprise.

He had indicated during the recent home test series against England that his time in charge was coming to an end. He said he'd committed to playing for South Africa until the World Twenty20 in Australia in October and November and that's now likely to be his swansong with the Proteas.

South Africa's captain Faf du Plessis plays a shot on day four of the fourth cricket test match between South Africa and England at the Wanderers stadium in Johannesburg, South Africa, Monday, Jan. 27, 2020. (AP PhotoThemba Hadebe)

South Africa's captain Faf du Plessis plays a shot on day four of the fourth cricket test match between South Africa and England at the Wanderers stadium in Johannesburg, South Africa, Monday, Jan. 27, 2020. (AP PhotoThemba Hadebe)

In tests, du Plessis will likely play one more series, when South Africa goes to the West Indies for a two-match series in July.

Du Plessis said it was the right time for him to step down and allow a new generation of leaders to emerge. He wanted to still play in all three formats for now, he said, and contribute as a batsman and senior player.

Du Plessis is the only South Africa test captain to win test series home and away against Australia and was one of the Proteas' best leaders.

Faf du Plessis of South Africa plays a shot during day four of the third cricket test between South Africa and England in Port Elizabeth, South Africa, Sunday, Jan. 19, 2020. (AP PhotoMichael Sheehan)

Faf du Plessis of South Africa plays a shot during day four of the third cricket test between South Africa and England in Port Elizabeth, South Africa, Sunday, Jan. 19, 2020. (AP PhotoMichael Sheehan)

Between 2016 and early 2018, South Africa won eight of nine test series home and away, beating Australia twice and India during that period. But the last year had been difficult with South Africa's loss of form on the field exacerbated by off-field issues at the national board, which has suspended its CEO amid allegations of mismanagement.

Du Plessis lost his last three test series in charge, at home to Sri Lanka, away to India and at home to England last month. During that England series, he said the last year had probably been the toughest he had experienced as captain.

“The last few weeks of rest away from the game have given me a lot of perspective on the great privilege and honor I have had in representing and leading my country in the three formats of this wonderful game," he said. “It has been a rewarding, sometimes tough and other times a lonely road, but I would not replace the experience for anything because it has made me the man that I am proud to be today.”

England's bowler Chris Woakes, right, celebrates after dismissing South Africa's captain Faf du Plessis for 3 runs on day two of the fourth cricket test match between South Africa and England at the Wanderers stadium in Johannesburg, South Africa, Saturday, Jan. 25, 2020. (AP PhotoThemba Hadebe)

England's bowler Chris Woakes, right, celebrates after dismissing South Africa's captain Faf du Plessis for 3 runs on day two of the fourth cricket test match between South Africa and England at the Wanderers stadium in Johannesburg, South Africa, Saturday, Jan. 25, 2020. (AP PhotoThemba Hadebe)

Du Plessis is expected to be selected to play as a batsman in home T20 and ODI series against Australia, which start this week.

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

South African captain Faf Du Plessis in action during day five of the second cricket test between South Africa and England at the Newlands Cricket Stadium in Cape Town, South Africa, Tuesday Jan. 7, 2020. (AP PhotoHalden Krog)

South African captain Faf Du Plessis in action during day five of the second cricket test between South Africa and England at the Newlands Cricket Stadium in Cape Town, South Africa, Tuesday Jan. 7, 2020. (AP PhotoHalden Krog)