Senegal's voters head to polls after tense campaign
Sunday’s election is taking place following a campaign gripped by tension between the rival coalitions of President Macky Sall, his predecessor Abdoulaye Wade and Dakar's detained mayor.
It is seen as a crucial test of support ahead of Senegal's presidential vote in 2019.
"We aren't talking any longer about July 30, but of 2019," Prime Minister Mahammed Boun Abdallah Dionne, who is running for a seat with Sall's coalition, declared at a rally on Thursday night.
Police have fired tear gas and arrested dozens during at times violent campaigning, in a country normally known for its peacefu democratic traditions.
Supporters of the president have clashed with those of Dakar mayor Khalifa Sall (no relation) for keeping him in preventive detention as he awaits trial for embezzlement charges.
The other thorn in President Sall's side is 91-year-old former head of state Abdoulaye Wade, under whom he served as prime minister until beating him in the 2012 presidential election.
Wade attempted to campaign in a downtown square he had decreed a restricted zone while still president in 2011, an area which sits just metres (yards) from the presidential palace, but was pushed back by security forces leading to several arrests.
There are a record 47 lists of candidates contesting the election, with 165 lawmakers to be selected for Senegal's parliament, which has less power than the presidency under the country's constitution.
Fifteen seats are being set aside for Senegalese expatriates, the first time that the country's diaspora, estimated at half a million, will have direct representation.
Polling takes place between 8 am and 6 pm (0800 to 1800 GMT), with first results known in the early hours of Monday.
Campaigning was marred by tragedy on July 15. Eight people were killed when rival supporters clashed during Senegal's League Cup final, and a stampede caused a wall to fall on escaping fans.
All sporting and cultural events were subsequently banned for the duration of the campaign.
ID card controversy
A controversy has also erupted over the failure to deliver enough new biometric ID cards needed to vote.
The president asked Senegal's constitutional council to relax the voting rules so people without the cards could use passports or other forms of identification to cast their ballots, a request granted on Wednesday.
Several political parties and opposition coalitions angrily denounced the last-minute move, saying it increased the possibility of fraud.
Sall will seek to bolster his support in parliament as he eyes a second term, while Wade is hoping an opposition victory will allow him to obtain an amnesty for his son, Karim.
Karim Wade is currently living in Qatar as part of a pardon deal after being convicted of illicitly amassing a fortune worth at least 178 million euros ($198 million), but it is believed his father wants him to take Senegal's top job one day after previously serving as a minister.
Meanwhile Khalifa Sall, who stands accused of the alleged misappropriation of 1.83 billion CFA francs ($2.85 million, 2.7 million euros) in city funds, languishes in jail after being repeatedly denied bail.
"Everywhere, I see the harmful effects of the policies of (Macky Sall's) regime which has pushed our nation to disaster," Khalifa Sall wrote in a letter from his cell published on Friday.
Khalifa Sall's supporters say the timing of the allegations is designed to weaken the onetime presidential hopeful's chances of forging ahead against his namesake, and a victory could give him extra bargaining power to negotiate his release, observers say.