Protesters hurled rocks at police who retaliated with tear gas in Senegal's capital Dakar on Friday after a top legal body said President Abdoulaye Wade had the right to run for a third term in elections next month.

Reuters reporters saw youths set fire to tyres in the street and overturn cars after a late-night ruling of the West African country's Constitutional Council.

Rivals to 85-year-old Wade say the constitution sets an upper limit of two terms on the president. Wade, who came to power in 2000 and was re-elected in 2007, has argued his first term pre-dated the 2001 amendment establishing the limit.

Stop these displays of petulance which will lead to nothing, Wade, 85, told state television in an appeal for calm.

The electoral campaign will be open. There will be no restrictions on freedom, said Wade, who faces 13 rivals in the February 26 election.

The Council validated 13 other candidates but rejected the presidential bid of world music star Youssou N'Dour, determining he had not gathered the necessary 10,000 valid signatures backing his candidacy.

It said authorities had been unable to identify around 4,000 of some 12,000 signatures gathered by N'Dour.

The decision of the Constitutional Council has nothing to do with the law, said N'Dour campaign manager Alioune N'Diaye.

It is purely political. Youssou N'Dour was a problem and they wanted to be shot of him, he told Reuters, adding that N'Dour planned an appeal.

All of the five judges on the Council are by law appointed by the president.

THREAT TO PEACE

The centrist Wade will face rivals including Socialist Party leader Ousmane Tanor Dieng and three ex-prime ministers - Idrissa Seck, Macky Sall and Moustapha Niasse.

Senegal is the only country in mainland West Africa to have not had a coup since the end of the colonial era. February's poll, and a possible run-off a few weeks later, are seen as major test of social peace in the predominantly Muslim country.

We are here to protest against Wade, Yero Toure, a 26-year-old student at an opposition rally of a couple of thousand people in central Dakar. If they don't reject him the people will rise up against him.

Critics say that Wade, who spent 26 years in opposition to Socialist rule, has done nothing during his 12 years in power to alleviate poverty in a country where formal employment is scarce, while dragging his heels on tackling official graft.

Wade points to increased spending on education and infrastructure projects such as roadbuilding as proof of his aim of turning Senegal into an emerging market country and a regional trade hub.

His candidacy has been controversial from the start, with rivals suspecting him of seeking to secure a new seven-year mandate only to hand over mid-term to his financier son Karim - who already has a superministry in the government. Both father and son have denied such a plan.

Wade backed down last June on planned changes to election rules after clashes between security forces and protesters who alleged the reforms were an attempt to ensure his victory.

His candidacy has raised eyebrows abroad. The senior U.S. State Department official for Africa, William Fitzgerald, told French RFI radio this month Washington viewed it as a bit regrettable.

From our point of view it was the right moment to go into retirement, to protect and support a good transition - democratically, peacefully, safely, Fitzgerald said.

(Writing and additional reporting by Mark John Editing by Maria Golovnina and Angus MacSwan)