Rebel forces withdrew from Chad's capital N'Djamena overnight, having laid siege to the palace where President Idriss Déby was making a last-ditch attempt to save his 18-year authoritarian rule.
A spokesman for the rebels, Abderaman Koulamallah, claimed they had retreated voluntarily in order to give the population a chance to evacuate the city.
But the government said it had control of the city. Speaking to Radio France Internationale, the interior minister, Ahmat Mahamat Bachir, said: "The whole of N'Djamena is under control and the savage mercenaries are routed."
Witnesses in the capital said government soldiers were patrolling the streets ahead of a planned UN security council meeting today to resume work on a presidential statement on the situation in Chad.
The security council met for emergency consultations on the situation yesterday, after which UN secretary general Ban Ki-moon released a statement saying he was "profoundly alarmed" by the fighting in N'Djamena.
The death toll from the fighting is not known, but the French aid agency Medecins sans Frontières said it had operated on one combatant and about 50 civilians injured by stray bullets since Saturday.
The Chadian Red Cross said about 200 people had been wounded.
There were also reports of widespread looting of shops as government troops resisted the rebel assault with helicopter gunships and tanks.
Hundreds of people have fled the fighting, crossing the Chari River to Kousseri in neighbouring Cameroon, the UN's refugee agency said.
Its spokeswoman, Helene Caux, said at least 400 had crossed and "people are still coming". She said her agency needed to confirm that the refugees were civilians with no fighters among them.
The Chadian government had evidently been caught unprepared by the speed of the rebels' move on the city after several thousand fighters in about 250 vehicles swept across the country in three days. Chad's army chief of staff, Daoud Soumain, was killed defending the capital.
The assault has forced the European Union to delay the deployment of a 3,700-strong peacekeeping force, dominated by France, to protect hundreds of thousands of Sudanese refugees from Darfur now living in eastern Chad from cross-border raids.
But EU foreign policy chief Javier Solana today rejected speculation that fighting in Chad would derail the EU deployment.
An advance team of 70 has already been sent to set up bases, Solana said. But he conceded that EU military officials would continue to assess the situation on the ground before deploying the entire force.
The EU also condemned "attempts of armed groups in Chad to seize power unconstitutionally" and called for an "immediate cessation" of hostilities.
Earlier, an aide to the French president, Nicolas Sarkozy, accused Sudan of backing the rebels in order to crush Déby's regime before the arrival of the peacekeeping force.
"Why did the intervention happen now?" It was the last moment - before the arrival of EUFOR, which was starting to be put in place - for Sudan to reach its goal, to try to liquidate the regime of Idriss Déby," Sarkozy's top aide, Claude Gueant, told Europe-1 radio.
The government in N'Djamena also claimed Sudan was supporting the insurgents to block the European intervention.
Chad's foreign minister, Amad Allam-Mi, told Radio France Internationale: "Sudan does not want this force because it would open a window on the genocide in Darfur."
The force was to be based in the area of the key eastern town of Adre, which rebels claimed they seized on Sunday. The government said it repelled the attack.
Adre, near the Darfur border, is a humanitarian hub surrounded by camps with about 420,000 refugees from Darfur and Chadians displaced in the spillover from the violence.
The French news agency reported French military sources as saying there were about 2,000 rebel fighters and that Déby had up to 3,000 troops.
Déby is a French-trained former fighter pilot who seized power in 1990 and has won three elections since but none were assessed to be free or fair.
The most recent ballot, two years ago, was boycotted by the opposition.
The rebel force attacking N'Djamena is a coalition of three groups led by Timane Erdimi, who is a close relative of Déby, and Mahamat Nouri, a former defence minister. The groups have for several years operated out of Sudan, leading Chad to accuse Khartoum of backing them.
Chad's foreign minister, Ahmad Allam-Mi, said Sudan was trying "to install a regime in Chad that will bow to it".