Sudanese President Omar al-Bashir attends a photo session at the African Union summit in Johannesburg, South Africa on June 15, 2015. South Africa has decided to withdraw from the International Criminal Court following a dispute over the visit by al-Bashir, who is wanted by the tribunal for alleged war crimes, crimes against humanity, and genocide.

South Africa announced on Friday that it would withdraw from the International Criminal Court. This makes it the second country this week to pull out, after Burundi filed to leave on Tuesday.

South Africa argues that a commitment to the peaceful resolution of conflict through dialogue involves hosting foreign leaders on its soil – including, at times, ones who have run afoul of the International Criminal Court (ICC). The ICC binds member countries to turn in visitors wanted for alleged crimes, however.

The departures may be a sign that some African nations have lost faith in the ICC. The Court has faced repeated criticism for allegedly pursuing its own agenda with court cases, which some Africans believe disproportionately target the continent.

All but one of the ICC’s 10 investigations have been based in Africa. All five of the Court’s substantive verdicts have been against African suspects. Though cases against non-African countries, including Britain, are undergoing preliminary examinations, the trend has led to calls for an African regional court.

The push to leave the ICC began when the Court indicted Kenyan president Uhuru Kenyatta in 2007, charging him with crimes against humanity after more than 1,000 people died in post-election violence. The case ultimately failed because of lobbying, bribery, and allegations that witnesses had been intimidated. But it frustrated African countries, which largely saw the charges against Kenyatta – a sitting president – as a form of international intervention in the affairs of a sovereign country.

With that in mind, the African Union has asked the ICC not to bring cases against incumbent leaders. It has also said that it will not force any member state to arrest a leader who has charges against him in the ICC. Michael Masutha, South Africa’s minister of justice and correctional services, said such arrests would amount to interference.

South Africa has been threatening to leave since the visit of Sudanese president Omar al-Bashir created conflict between country and Court last year. The ICC has a warrant out for his arrest on charges of war crimes, crimes against humanity, and the genocide in Darfur – charges al-Bashir denies. But South Africa’s diplomatic immunity law allowed him to leave the country.

For some, the departures have sparked concerns about the protection of human rights on the continent. The ICC had widespread support in Africa at its inception, when leaders wanted to prevent another event like the Rwandan genocide. As countries leave, the ICC loses its oversight.

"It’s important both for South Africa and the region that this runaway train be slowed down," Dewa Mavhinga, a senior researcher for Human Rights Watch’s Africa division, told the Associated Press on Friday.

Burundi left because the ICC wanted to investigate political violence there. The violence has been going on since last year, when President Pierre Nkurunziza decided to seek a third term, a move some have called unconstitutional.

But Mr. Masutha indicated that Africa is still concerned about human rights. He said the countries of the continent are strengthening their domestic human rights institutions. For its part, South Africa will promote human rights "here and elsewhere in the world."

Kenya has also suggested that it is considering leaving. The departures will take effect one year after the UN Secretary General receives a formal "Instrument of Withdrawal" from the departing country. Until that time, they will be bound to follow ICC law.

The United States is not a party to the Rome Statute, which governs the ICC.

Material from the Associated Press and Reuters contributed to this report.