Senegal's highest court has ruled the country's increasingly frail, 85-year-old president Abdoulaye Wade could run for a third term in next month's election, a deep blow to the country's opposition, which has vowed to take to the streets if the ageing leader does not step aside.
Minutes after the court's verdict, police opened fire with tear gas to disperse hundreds of young men who had gathered at a downtown roundabout. Protesters hid in side streets and in groups of five and six ran back out to lob rocks at the security forces.
The protests spread throughout the capital as demonstrators dragged wooden market tables into intersections and set them on fire. In the provincial capital of Kaolack, a mob set fire to the ruling party's headquarters, and in Thies, angry youths blocked the national road, according to a private radio station.
The legality of President Wade's candidacy is bitterly disputed because the constitution was revised soon after he assumed office in 2000 to impose a two-term limit.
Mr Wade argues the new law should not apply to him since he was elected before it took effect.
The court deliberated behind closed doors for hours before emerging and issuing a list of 14 approved candidates, including Mr Wade.
Senegalese pop star Youssou Ndour, arguably Africa's most famous musician, was not on the list - another blow to the opposition, which had hoped that Mr Ndour's candidacy would shine an international spotlight on the race.
"The fact that my candidacy was deemed unacceptable is a political matter. Those in power are afraid of me," said the Grammy-winning Ndour on the private TV station he owns. "I will not let go of this because when I decide to do something I do it all the way. This Saturday, I will draft an appeal."
Since taking office, Mr Wade has come under mounting criticism, first for delegating an increasing share of power to his son, as well as for the corruption scandals that have overshadowed his administration's achievements, including the building of numerous roads and bridges.
After winning a second term in 2007, Mr Wade told reporters he would not seek a third term. He then reversed course, arguing that the term limits were imposed after he was elected, and that no law can be applied retrospectively.