Thirteen South African soldiers were killed in the Central African Republic as rebels seized the capital over the weekend, President Jacob Zuma has said.
Mr Zuma said the South Africans had died in a nine-hour "high-tempo battle" against the "bandits" in Bangui.
South Africa had about 200 troops stationed in the city to block Seleka rebels from seizing power.
Rebel leader Michel Djotodia said he would uphold a peace accord that promised elections in three years.
He also said the existing power-sharing government would remain in place.
"We are not here to carry out a witch-hunt," Mr Djotodia told Radio France Internationale (RFI).
Looters and armed gangs roamed the streets of Bangui after Mr Djotodia's forces captured the presidential palace on Sunday.
Ousted President Francois Bozize has fled the capital.
He is believed to be in neighbouring Democratic Republic of Congo - although this has been denied by the Congolese government.
Mr Zuma said just over 200 South African troops had battled more than 1,000 "bandits".
"They 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 ceasefire," he said.
"Our soldiers inflicted heavy casualties among the attacking bandit forces."
Thirteen South African troops were killed, 27 wounded and one was unaccounted for, Mr Zuma said.
"Our soldiers paid the ultimate price in the service of their country and Africa," Mr Zuma said.
"The actions of these bandits will not deter us from our responsibility of working for peace and stability in Africa and of supporting the prevention of the military overthrow of constitutionally elected governments and thus subverting democracy."
Mr Djotodia told RFI that Seleka would respect the peace deal signed with Mr Bozize in January, AFP reports.
Opposition figure Nicolas Tiangaye, who was appointed prime minister of a unity government formed as part of that deal, would remain in the post, he said.
"I met Mr Tiangaye. We have spoken with him," Mr Djotodia is quoted as saying.
Seleka would also hold free and fair elections within three years, as set out in the deal, he added.