DAKAR, Senegal (AP) 鈥 Senegal votes Sunday in a tightly contested presidential election that has fired up political tensions and tested one of West Africa鈥檚 most stable democracies.

The election will take place after much uncertainty following President Macky Sall鈥檚 until the end of the year, sparking violent protests.

In the latest turn of events leading up to Sunday鈥檚 vote, opposition leader Ousmane Sonko , triggering jubilant celebrations on the streets of Dakar and renewed excitement about the contest.

Sunday鈥檚 election is set to be Senegal鈥檚 fourth democratic transfer of power since it gained independence from France in 1960. The country is viewed as a pillar of stability in a region that has seen dozens of coups and attempted coups in recent years.

Alioune Tine, founder of Afrikajom, a Senegalese think tank, told the Associated Press that Sunday鈥檚 election had set a grim record in the country鈥檚 democratic history, with rights groups accusing Sall鈥檚 government of repressing the media, civil society and the opposition.

鈥淚t was the longest and most violent presidential election process, with the most deaths, injuries and political detainees,鈥 said Tine.

Human Rights Watch said nearly 1,000 opposition members and activists have been arrested across the country in the last three years. But , Sall denied that he鈥檚 trying to hold on to power.

There are 19 candidates in the race, the highest number in Senegal鈥檚 history. These include a former prime minister, a close ally of Sonko 鈥 who was barred from running 鈥 and a former mayor of Dakar. A runoff between leading candidates is widely expected.

Despite the violent upheavals in recent months, analysts say unemployment is the chief concern for a majority of young Senegalese. Around half of Senegal's population of 17 million are under 18, according to Afrobarometer, an independent survey research group.

鈥淭he big question right now for the Senegalese election is how are we going to break out of poverty,鈥 said Mari猫me Wone Ly, a former Senegalese political party leader. 鈥淲e can鈥檛 see the end of the tunnel. People don鈥檛 see it.鈥

About a third of Senegalese live in poverty, World Bank data shows. Thousands have fled towards the West in search of economic opportunity, undertaking risky and often deadly journeys.

Analysts say Amadou Ba, a former prime minister, and Bassirou Diomaye Faye, who is backed by Sonko, are likely to emerge among the front-runners. Faye was also freed from prison last week, in time to spend the final days of the run-up to Sunday鈥檚 vote on the campaign trail.

Sonko was disqualified from the ballot in January because of a prior , Senegal鈥檚 highest election authority said at the time. His supporters maintain his legal troubles are part of .

The popular opposition leader has faced a slew of legal troubles that started when he was accused of rape in 2021. He was acquitted of the charge but and sentenced to two years in prison last summer, which ignited deadly protests across Senegal.

Senegal was gripped by deadly unrest last summer when protesters took to the streets over concerns that Sall would seek a third term in office. Constitutional reforms prohibit a president from serving more than two consecutive terms as decided by a 2016 referendum.

Sall eventually ruled out a third term.

Other contenders for top spots in the race are Idrissa Seck, who has run in previous races and served as prime minister some 20 years ago before being sacked and briefly jailed over corruption allegations, and Khalifa Sall, a former mayor of Dakar and longtime opposition figure. Sall and the president are not related.

, the first woman to run for president in years, is the only female presidential candidate in the race, but few expect her to gain a significant share of the vote.

Sall鈥檚 surprise move to release Sonko and Faye has helped to defuse tensions that had escalated in recent months. Election observers say Sunday鈥檚 vote is more likely to be peaceful.

鈥淟oosening the knot has tempered things a little, and has brought a bit of calm to the public arena," said Rokhiatou Gassama, a civil society election observer. 鈥淎ccording to my analysis, we鈥檙e going to have a peaceful election.鈥

___

Associated Press writer Babacar Dione in Dakar, Senegal, contributed.

___

Follow the AP鈥檚 coverage of global elections at:

The 好色tv Press. All rights reserved.