Senegal's Constitutional Court has ruled that President Abdoulaye Wade is eligible to stand for a third term in next month's elections.
Mr Wade has already served two terms.
But the constitution was amended since Mr Wade, 85, was last elected, and he has argued the law is not retroactive.
Hundreds of protesters earlier gathered in the capital Dakar ahead of the court ruling, and there were reports of clashes after the ruling. Singer Youssou N'Dour's bid was ruled invalid.