The president of the Central African Republic fled the country for Cameroon on Sunday after rebels overran Bangui, the capital of the impoverished nation long racked by rebellions.

South Africa, which has had troops stationed in the country as trainers and for security, said Monday that 13 of its soldiers were killed in fighting with rebels, prompting questions about why its forces had intervened in such a volatile conflict.

Ousted President Francois Bozize sought “temporary” refuge on Cameroonian territory, the government confirmed Monday.

The African Union on Monday imposed a travel ban and asset freeze on seven leaders of the rebel coalition, known as Seleka, and said its advance had undermined prospects for a lasting solution to the crisis in the landlocked country. It urged African states to deny “any sanctuary and cooperation” to the rebel leaders.

The United States is “deeply concerned about a serious deterioration in the security situation” in the Central African Republic, State Department spokeswoman Victoria Nuland said in a statement Sunday.

“We urgently call on the Seleka leadership which has taken control of Bangui to establish law and order in the city and to restore basic services of electricity and water,” the statement said.

The Central African Republic’s new leadership appeared fragmented, with a split emerging in the rebel coalition that seized Bangui.

The rebel groups making up the Seleka alliance agreed they wanted Bozize out. But some rebels complained of broken promises of government jobs and other benefits; others cited the deep impoverishment of the country’s distant north despite its considerable wealth in gold, diamonds, timber and uranium.

South Africa’s losses point to the challenges that the country faces as it tries to project continental leadership amid questions about the adequacy of its resources and the clarity of political direction from Pretoria. It has participated in peacekeeping in regions including Burundi and Sudan’s Darfur.

Africa has a fraught history of foreign military missions, whether for humanitarian or political purposes, or some combination of the two, in times of conflict. The central part of the continent, repeatedly buffeted by interlocking rebellions, is particularly treacherous for countries with an activist foreign policy.

In addition to the deaths, 27 South African soldiers were wounded. The losses were the country’s worst in combat since nine soldiers died in Lesotho in 1998.

“I think South Africa realized right from the beginning that there will be casualties,” said Johan Potgieter, a researcher at the Institute for Security Studies, in Pretoria. “If you want to be in peacekeeping, and you don’t want body bags, you should get out of there.”

Central Africa's president Francois Bozize, right, stands next to Seleka rebel coalition chief Michel Djotodia after talks in Libreville on Jan. 11. (Steve Jordan/AFP/Getty Images)

South African troops served as trainers for the Central African Republic army. But more troops were sent to protect the trainers as security deteriorated.

Critics questioned the collaboration with Bozize, who came to power in a rebellion a decade ago and whose commitment to the terms of past peace deals was in doubt.

This week was meant to be a triumph for South Africa, which will host Brazil, Russia, India and China at a summit of the group of emerging nations, including South Africa, known as “BRICS.” South African President Jacob Zuma gave a speech Monday that was supposed to celebrate the summit, but he devoted his first remarks to mourning those killed in Bangui.

About 200 South African soldiers were deployed at the Bangui base. Estimates of the size of the rebel force that attacked them ranged from at least five to 15 times as big, raising questions about the security precautions and reconnaissance abilities of the South African contingent.

South African troops “fought a high-tempo battle for nine hours defending the South African military base, until the bandits raised a white flag and asked for a cease-fire,” Zuma said. “Our soldiers inflicted heavy casualties among the attacking bandit forces.”

— Associated Press