French President Francois Hollande today flew into Central African Republic, hours after two French soldiers were killed in fighting.
He praised his troops for tackling "horrendous violence" against women and children and helping avert a slide into civil war.
Mr Hollande ordered a 1,600-strong French force into its former colony last week with United Nations backing to disarm Muslim and Christian militias and halt fighting that was spilling over into killing of civilians.
Fighting continued today. Crowds attacked a mosque, looted houses and torched cars in the capital, Bangui.
The French force suffered its first casualties overnight, when two soldiers were killed in clashes with unidentified gunmen.
Medical charity Medecins Sans Frontieres said 72 people had been treated, mainly with gunshot wounds, in two Bangui hospitals.
Several lynchings were reported by residents overnight, adding to the toll of 465 killed since Thursday.
A solemn Mr Hollande walked across the runway after flying into Bangui airport to a large tent where he paid homage at the coffins of the two French soldiers, draped with the French tricolore flag.
"It was time to act," he told troops assembled in the tent.
"It was soon going to be too late ... For weeks, massacres were conducted and horrendous violence was done to women and children.
"The clashes were taking on a religious dimension with the risk of leading to a civil war."
Mr Hollande was making a stopover in CAR on his way back from a memorial service for Nelson Mandela in South Africa.
CAR has been gripped by chaos since mainly Muslim Seleka rebels seized power in March.
Months of looting, rape and killings since has brought reprisals by Christian militias and allies of ousted President Francois Bozize.
Michel Djotodia, rebel leader-turned interim president, has largely lost control of his loose band of fighters, whichincludes many gunmen from Sudan and Chad.
Christians fled reprisals by Seleka gunmen following a failed offensive on Bangui last week but the French move to disarm all fighters has subsequently weakened Seleka's influence in the capital, leading to counter-attacks.
In the Fouh neighbourhood today, a Reuters correspondent saw civilians armed with wooden clubs and machetes attack a mosque and nearby houses.
"We found arms in their mosque. We don't want to see Djotodia and his Muslims here anymore," said one man at the scene, who wielded a large knife and refused to give his name.
At least six people were lynched overnight, mainly during violence targeting Muslims, according to residents in Benz-viand Miskine, Bangui neighbourhoods.
"Three of those stoned to death were Seleka fighters who had been disarmed and a fourth killed was a Muslim whose relatives were part of Seleka," said Hilaire Ouakanga, a resident of Benz-vi.
Central African Republic is rich in diamonds, gold and uranium but despite such resources, most people remain poor.
The country has seen little stability in five decades and France has intervened more times since independence in 1960 than in any of its former colonies.
It also lies at a crossroads of conflict in the heart of Africa, with Sudan, South Sudan and Somalia to the east, the Islamist threat in the Sahel region to the northwest and the revolts of the Great Lakes to the southeast.
Mr Djotodia issued a statement offering his condolences to France for the soldiers' deaths.
"The French contingent and FOMAC [Multinational Force of Central Africa] are our partners for restoring peace and security to our country," he said.
UN refugee agency UNHCR said about 100,000 people had fled their homes in Bangui in the past few days, bringing to more than half a million the number of displaced countrywide since the crisis began a year ago.
The French presence on Bangui's streets was lighter than yesterday, when disarmament operations were launched.
The French force has exchanged gunfire with gunmen several times since yesterday, when it began an operation to disarm rival Muslim and Christian fighters, but the deaths overnight were the first confirmed casualties.
The two French soldiers, marine paratroopers from the 8th Regiment based in Castres, died after coming under attack at close range from five or six unidentified lightly-armed men, the army said.
According to Celestin Christ Leon, a spokesman for the African peacekeeping force, a Seleka commander was harassing people who called the French for help.
"They came and tried to disarm the Seleka but gunfire erupted," he said.
French soldiers have also been deployed to other towns across the country, where a 2,500-strong regional African peacekeeping force has struggled to stamp its authority.
After the deaths, French Defence Minister Jean-Yves Le Drian said the current French troop levels were sufficient to stabilise the country, which is roughly the size of France.
France, which also has soldiers in Mali, has sought to shed its image of policeman on the continent but officials say the level of violence in Central African Republic required action.
During Mr Hollande's brief stop, he was also due to meet Mr Djotodia, French and African peacekeepers and religious leaders before flying back to France late tonight.
Mr Hollande has accused Mr Djotodia of not doing enough to curb the violence.