* Protests erupt as rebels near capital
* Government minister appeals to Paris for help
* French troops deployed to protect embassy (Adds U.N. statement)
By Paul-Marin Ngoupana
BANGUI, Dec 26 (Reuters) - A government minister in the Central African Republic on Wednesday called for French soldiers stationed there to intervene as rebels closed in on the capital having passed the last major town to the north.
The appeal for help came as hundreds of people protested outside the French Embassy in Bangui, the capital, throwing stones at the building and tearing down the French flag in anger at a rebel advance through the north of the country.
Paris did not immediately respond to the aid request but announced that French troops would be deployed to secure the embassy. The United Nations criticized the rebel advance.
U.N. Secretary-General Ban Ki-moon's spokesman, Martin Nesirky, issued a statement saying Ban "strongly condemns the armed attacks on several towns in the Central African Republic perpetrated by the coalition of rebel groups 'SELEKA'."
"These developments gravely undermine the peace agreements in place and the efforts of the international community to consolidate peace in the Central African Republic," he said.
Nesirky also confirmed that dependents and all "non-essential" U.N. staff had been temporarily relocated. He added that Ban's special representative in the country, Margaret Vogt, "continues to engage the government and the rebel leaders with a view to ensuring a ceasefire and initiating dialogue."
U.N. officials told Reuters privately that around 50 essential U.N. staff have remained in the CAR while the rest were relocated to Senegal.
The rebel push through a string of towns in recent weeks has highlighted the fragility of the land-locked nation, which has rich deposits of uranium as well as gold and diamonds but has been largely unstable since independence from France in 1960.
A military source and an aid worker said the rebels had got as far as Damara, 75 km (47 miles) from Bangui, by late afternoon, having skirted Sibut, where some 150 Chadian soldiers had earlier been deployed to try and block a push south by a rebel coalition.
"It is true, they are at the gates of Bangui," a government official told Reuters, asking not to be named.
Several armies from Central Africa have troops in the CAR as part of the MICOPAX stabilisation mission, and Chad sent extra soldiers earlier this month to try and halt the rebel advance.
It was not clear whether the rebels, who have swept across the country on pick-ups and motorbikes, met resistance in Sibut.
Colonel Djouma Narkoyo, a spokesman for the Seleka rebel alliance, which says it wants the full application of a peace deal to end a previous rebellion or else it will topple the president, said fighters would not, for now, enter Bangui.
"We call on the (army) to lay down its weapons as (President Francois) Bozize has lost all his legitimacy and does not control the country," he said.
French broadcaster RFI on Wednesday quoted Josue Binoua, the CAR's minister for territorial administration, calling for French intervention.
"We are waiting for France to come to our help!" he was quoted as saying on RFI's website in response to a question over what Bangui expected from France's troops stationed there.
As night fell, Bangui's residents stocked up on food and other provisions, and some people in northern neighbourhoods said they would sleep with relatives or friends elsewhere.
With a government that holds little sway outside the capital, some parts of the country have long endured the consequences of conflicts in troubled neighbours Chad, Sudan and the Democratic Republic of Congo spilling over.
CAR is one of several nations in Central Africa where U.S. Special Forces have been deployed to help regional armies track down the notorious Lords Resistance Army rebel group.
French nuclear energy group Areva is the main mining firm in the country with the Bakouma uranium deposit in the south.
French military officers act as advisors to the CAR's army and Paris in the past has helped prop up or oust governments. However, France is increasingly reluctant to directly intervene in conflicts in its former colonies.
A Reuters reporter at the scene of Wednesday's demonstrations said some protesters had accused France of backing the rebels while others had demanded French forces in the country help the army fight off the rebel push.
A smaller group of protesters, mainly youths linked to the ruling party, gathered outside the U.S. Embassy and stoned cars carrying white passengers, the reporter said.
The French Defence Ministry said some of the 250 soldiers in the country as part of the MICOPAX peacekeeping mission had been sent to secure the embassy and protect French nationals.
Vincent Floreani, deputy spokesman in the French foreign ministry, did not comment on the appeal for help but said the crisis had to be resolved through dialogue.
The United States also called for dialogue and has "strongly encouraged" its citizens to leave the country until the security situation improved. Air France's weekly Paris-Bangui flight had to turn back "due to the situation in Bangui".
On Tuesday, the rebels took the central town of Kaga Bandoro despite the presence of troops from neighbouring nations who were meant to shore up the weak national army.
Bozize came to power in 2003 after a brief war and has repeatedly relied on foreign intervention to fend off rebellions and insecurity stemming from neighbouring conflicts.
"It has been a pretty tense day in the city. It is hard to tell who is with who," an aid worker told Reuters.
"It is not clear if (the rebels) are going to be able to march in and take it. I guess we will know later tonight." (Additional reporting by Louis Charbonneau in New York, Leigh Thomas in Paris, Andrew Quinn in Washington and David Lewis in Dakar; Writing by David Lewis; Editing by Andrew Osborn and Paul Simao)