Violence has broken out in Senegal after the country's top court ruled that President Abdoulaye Wade can run for a third term in office next month.
Protesters set buildings and barricades on fire in the capital. A policeman was killed in the unrest, officials say.
The court also barred Senegal's best-known music star Youssou N'Dour - an opponent of Mr Wade - from standing.
Mr Wade, 85, appeared on television to call for calm, describing the protests as "displays of petulance".
The president has already served two terms in office, but the constitution has been amended since he was last elected and he argued that the change did not apply retrospectively.
The opposition had earlier warned it would hold street protests if Mr Wade's candidacy was approved, and crowds had gathered in the capital Dakar to await the ruling.
After the decision by the constitutional court, youths set fire to tyres and threw stones at riot police, who responded by firing tear gas.
Reports from the central town of Kaolack said the local headquarters of Mr Wade's party had been burned down.
Unrest was also reported in Thies and Mbour, near Dakar.
The authorities earlier said the protests would be tolerated in spite of an official ban on demonstrations.
The court's statement, issued late on Friday, listed 14 candidates - including Mr Wade - as eligible to stand in the 26 February election.
However the court barred Youssou N'Dour from running, saying many of the signatures he had gathered to support his candidacy could not be verified.
The Grammy award-winning musician had announced earlier this month that he would stand.
"The people are fed up with career politicians who almost all enriched themselves with the state's money," he said at the time.
The list of candidates who can stand includes three former prime ministers, Idrissa Seck, Macky Sall and Moustapha Niasse as well as the main opposition leader Ousmane Tanor Dieng.
Youths at Place de l'Obelisque in central Dakar told the Associated Press that they planned to turn it into the equivalent of Egypt's Tahrir Square if Mr Wade's candidacy was allowed to go ahead.
Mr Wade insisted in his television appearance that the February poll would be fair.
"The electoral campaign will be open. There will be no restrictions on freedom," he said.
"Stop these displays of petulance which will lead to nothing," he told the protesters.
Senegal is seen as one of the most democratic and stable countries in West Africa - it is the only country in the region never to have experienced a military coup.
However, tension is rising ahead of the election and one prominent politician has been charged with murder.