JOHANNESBURG (AP) — The president of the Central African Republic fled the country for Cameroon after rebels overran the capital of the impoverished nation long wracked by rebellions.

South Africa said Monday that 13 of its soldiers were killed in fighting with rebels, prompting criticism about why its forces had intervened in such a volatile conflict.

Ousted President Francois Bozize sought "'temporary" refuge on its territory, the Cameroonian government confirmed Monday.

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

The African Union on Monday imposed a travel ban and asset freeze on seven leaders of the rebel coalition, known as Seleka, and said their 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 chiefs.

The United States is "deeply concerned about a serious deterioration in the security situation" in Central African Republic, said U.S. 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 rebel groups making up the Seleka alliance agreed they wanted Bozize out. Some of the rebels complained of broken promises of government jobs and other benefits. Others cited the deep impoverishment of the country's distant north despite the Central African Republic's considerable wealth of gold, diamonds, timber and uranium.

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 South African troop deaths, another 27 soldiers were wounded in the country's worst loss 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, the South African capital. "If you want to be in peacekeeping, and you don't want body bags, you should get out of there."

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 Darfur in Sudan.

South African troops served as trainers for the national army in the Central African Republic. But more troops were sent to protect those trainers as security deteriorated, and 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 triumphant for South Africa, which will host Brazil, Russia, India and China at the "BRICS" summit. South African President Jacob Zuma gave a speech on Monday that was supposed to celebrate the summit, but he devoted his first remarks to mourning for those killed in the battle in Bangui, the capital of the Central African Republic.

Some 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 bigger, 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."

Gen. Solly Shoke, South Africa's military chief, said 3,000 rebels armed with mortars and heavy machine guns took part in the fighting. The bulk of the fighting occurred Saturday, though rebels contacted South African forces early Sunday to arrange and "uneasy truce," the military chief said.

South African authorities were working to identify a body, raising the possibility that the death toll would increase to 14 if it is determined the body is that of the missing serviceman.

The rebels' invasion of the capital came two months after they signed a peace agreement that would have let Bozize serve until 2016. That deal unraveled in recent days, prompting the insurgents' advance into Bangui, where French troops moved to secure the airport.

Defense analyst Helmoed Heitman said on South Africa's Radio 702 that the South African force in the Central African Republic was lightly equipped and had no aerial support. In the past, he said, South Africa turned down a deal for military transport helicopters because it could not afford them.

The Democratic Alliance, an opposition party in South Africa, said the government should explain why South African forces were deployed "in the middle of what amounted to a civil war, with so little military support."

The government of Cameroon said Bozize would be leaving for another unspecified country. There were reports of looting in Bangui amid the specter of continuing unrest.

Michel Djotodia, one of the leaders of the rebel coalition, said he considers himself to be the new head of state. Another rebel leader, Nelson N'Djadder, said he does not recognize Djotodia as president.

"We had agreed that we would push to Bangui in order to arrest Bozize and that we would then announce an 18-month transition, a transition that would be as fast as possible — and not one that would last three years," N'Djadder told The Associated Press by telephone from Paris. "I have enough soldiers loyal to me to attack Djotodia. I am planning to take the Wednesday flight to Bangui."

N'Djadder said rebels —not those under his command — had pillaged homes in Bangui, including those of French expatriates.

The U.S. State Department said it was concerned about the security situation and urged the Seleka leadership to establish order and restore electricity and water.

The rebel success in the nation of 4.5 million suggests the possible backing of neighboring nations. There has been speculation that either Chad or Sudan or Gabon had provided the rebels with arms and logistical support. Djotodia rejected that claim.

The overthrow of Bozize could affect the hunt for Joseph Kony, said the commander of African troops tracking the fugitive warlord. Bozize was a strong supporter of African efforts to dismantle Kony's Lord's Resistance Army.

Ugandan Brig. Dick Olum, speaking from his South Sudanese military base in Nzara, said Monday he is concerned by past rebel statements that all foreign troops must leave the country. Some 3,350 African troops are currently deployed against the LRA in South Sudan and the Central African Republic. The U.S. also has anti-Kony military advisers in the Central African Republic.

Central African Republic has suffered instability since obtaining independence from France in 1960, including at least three coup plots in 2012, according to a December analysis by Alex Vines of the London-based Royal Institute for International Affairs. He said the European Union had spent more than 100 million euros on peace missions there since 2004.