AB de Villiers will continue as Test captain on a permanent basis after accepting the offer from Cricket South Africa.
The national selectors recommended De Villiers to the CSA board, which announced the decisions on Friday.
De Villiers was the stand-in captain for the last two home tests against England, after Hashim Amla quit the job.
His first assignment in charge will be a home series against New Zealand in August.
“I thoroughly enjoyed captaining in the last two tests against England, and although I still have a lot to learn in this role, it’s a new challenge that I’m excited to take on,” De Villiers said in a statement released by CSA.
Emboldened by the consolation 280-run win over England on Tuesday in the fourth and last Test, De Villiers said “I believe we are witnessing the emergence of another great team. We are rebuilding and have a long way to go to being a finished product as a squad.
“We may have to fight through some tough times, but the recent performances of Kagiso Rabada, Temba Bavuma, Dane Piedt, Dean Elgar and others have created an opportunity to build a team that delights and unites our country as never before.”