Dakar - Senegal holds a legislative election on Sunday following a campaign gripped by tension between the rival coalitions of President Macky Sall, the former president Abdoulaye Wade and Dakar's mayor, Khalifa Sall.
Campaigning ends on Friday, with the first results known in the early hours of Monday.
Polling will take place between 08:00 and 18:00 on Sunday in what is seen as a crucial test of support ahead of a presidential vote in 2019.
Police have fired tear gas and arrested dozens during campaigning as supporters of President Sall clashed with those of Mayor 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 Wade, under whom he served as prime minister until beating him in a 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 from the presidential palace, but was pushed back by security forces.
The campaign period, which began on July 9, was also marred by a football stadium tragedy.
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 banned after the July 15 disaster for the duration of the campaign.
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.
A controversy has also erupted over the failure to deliver enough new biometric ID cards needed to vote.
President Sall asked the country's constitutional council to relax the voting rules so people without voting 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) in city funds, languishes in jail after being repeatedly denied bail.
His supporters say the timing of the allegations is designed to weaken the onetime presidential hopeful's chances of forging ahead against President Sall, and a victory could give him extra bargaining power to negotiate his release, observers say.