Senegal's reputation as a bastion of democracy in an unstable region is on the line after protesters clashed with riot police outside parliament on Monday.
Inside, lawmakers passed a contentious bill to extend President Macky Sall's tenure and delay elections after he called off a planned election with just three weeks to go.
The opposition say some of their members were forcibly removed from the parliament building by police in riot gear to stop them from voting.
Khalifa Sall, a leading opponent and a former mayor of Dakar, who is not related to the president, called the delay a "constitutional coup" and urged people to protest against it. His political coalition has vowed to go to court.
Thierno Alassane Sall, another candidate, also no relation, called it "high treason" and urged his supporters to gather in front of the National Assembly to protest and "remind MPs to stand on the right side of history".
The proposal needed the support of three-fifths (ie 99) of the 165 deputies to pass. The ruling Benno Bokk Yakaar coalition, of which President Sall's Alliance for the Republic party is part, has a slight majority in parliament.
In the end 105 MPs voted for the proposal. A six-month postponement was originally proposed, but a last-minute amendment extended it to 10 months, or 15 December.
Mr Sall reiterated that he was not planning to run for office again. But his critics accuse him of either trying to cling on to power or unfairly influencing whoever succeeds him.
No sooner had he announced the unprecedented postponement than protesters marched across the capital, Dakar, to call for a reversal. At least 150 people have been arrested in the past two days.
West Africa's regional bloc Ecowas on Tuesday pleaded for Senegal's political class to "take steps urgently to restore the electoral calendar" in line with the constitution.
Former Prime Minister Aminata Touré condemned the passage of the bill in a post online.
Senegal has long been seen as one of the most stable democracies in West Africa. It is the only country in mainland West Africa that has never had a military coup. It has had three largely peaceful handovers of power and never delayed a presidential election.
Until now.
In 2017, Senegalese troops led the West African mission sent to neighbouring The Gambia to force out long-time ruler Yahya Jammeh after he refused to accept he had lost an election. And in a region beset by coups, President Sall has been a key actor in the push by Ecowas to force military leaders to conduct elections and hand over power to civilians.
But Senegal's democratic credentials now hang in the balance, and a constitutional crisis is brewing. The country faces a critical test of its electoral integrity and judicial independence, analysts say.
Tensions have been rising for more than two years following what the opposition say was a deliberate attempt to exclude them from the election by having their candidates charged with crimes they had not committed. One major opposition party was even banned.
The authorities have denied using the legal system for political gain and President Sall said he was trying to calm things down by delaying the vote but this does not appear to have worked so far.
"The decision has thrown Senegal into uncharted waters of a constitutional crisis," Mucahid Durmaz, senior West Africa analyst at risk intelligence company Verisk Maplecroft, tells the BBC.
"The constitution requires elections to be organised at least 30 days before the end of the incumbent president's mandate. Sall's rule expires on 2 April. And the decree detailing the electoral calendar must be released 80 days before the vote takes place. Even if he appoints a transitional president after 2 April, the legality of it will be disputed."
Authorities restricted access to mobile internet services on Monday to prevent what they called "hateful and subversive messages" from spreading online and posing a threat to public order - in other words to make it harder for protesters to organise.
Some residents tell the BBC they have been using wifi and Virtual Private Networks (VPN's) to bypass the curbs but not everyone is able to do this.
The opposition has condemned the shutdown of the signal of private television channel Walf TV for "incitement to violence" over its coverage of the demonstrations.
Two opposition politicians, including former Prime Minister Aminata Touré, once a close ally of President Sall but now one of his harshest critics, were both briefly detained following the protests.
Critics fear that this clampdown could plunge the country into further political turmoil which, by extension, could be dangerous for the whole West African region.
Satisfaction with democracy in Senegal has declined sharply under Mr Sall. In 2013 Afrobarometer, a pollster, found that after Mr Sall had taken office, more than two-thirds of Senegalese people were fairly or very satisfied with democracy. By 2022 less than half were.
However, Durmaz says he does not foresee the possibility of a military coup because Senegal has a "diverse range of political parties, a robust civil society and influential religious leaders who step in to mediate political disputes between the politicians".
Twenty candidates had made the final list to contest the elections, but several more were excluded by the Constitutional Council, the judicial body that determines whether candidates have met the conditions required to run.
Prominent among them were firebrand opposition leader Ousmane Sonko barred because of a libel conviction, and Karim Wade, the son of a former president, who was accused of having French nationality. They both say the cases against them are politically motivated.
Despite the delay, it is unlikely Mr Sonko will be able to participate in the election, as his party has already replaced him with Bassirou Faye who is also in jail but remains eligible to run, Mr Durmaz says.
Mr Sonko has shown that he is able to mobilise his supporters on to the streets and so while he remains barred, tensions are likely to stay high.
His banned Pastef party has vowed to push back against the delay, calling it a "serious threat to our democracy" and "contempt for the will of the people".
This is not the first time leading opposition candidates have been barred from running in presidential elections. Both Karim Wade and Khalifa Sall were jailed for corruption in 2015 and 2018 respectively, and barred from running in 2019.
This time, allegations of judicial corruption involving the Constitutional Council, brought by Karim Wade's party, prompted a parliamentary inquiry.
President Sall justified the election delay by saying time was needed to resolve the dispute that ensued between the Council and some members of parliament.
Despite the widespread anger over the delay, Mr Wade's Senegalese Democratic Party (PDS) has backed it, and if its MPs vote with the government, the bill could pass.
But Wole Ojewale, Dakar-based regional co-ordinator for Central Africa at the Institute for Security Studies, says the delay is not justified.
"The president is not in charge of the electoral process, and to the extent to which the electoral umpire has not raised doubts about their capacity to undertake the election. I don't think anything should derail the political process."
Mr Sall's critics suggest he may have feared his chosen successor, Prime Minister Amadou Ba, was in danger of losing the election.
"His [President Sall's] party is losing momentum. There are indications that they probably want to see how they can rejig, or probably replace their candidate," Ojewale says.
He says there is still a window to conduct the election as scheduled. Otherwise, the country may be plunged into widespread unrest, becoming a police state where civil liberties are eroded, a view Durmaz shares.
Ecowas and the African Union have called for dialogue. France, the US and the EU have all called for an election as soon as possible.
However, Durmaz says President Sall's international image would minimise any external pressure on him.
"I do not expect a firm push by Ecowas to reverse the postponement of the election in Senegal," he says, noting that the credibility of regional organisations such as Ecowas and the AU "has been significantly tarnished due to their inability to confront the democratic deficit in civilian-run countries".
All eyes will now be on the regional blocs to see how they treat yet another democratic headache in West Africa.
Latest Stories
-
Expansion Drive: Takoradi Technical University increases faculties
4 hours -
SHS heads demand payment of outstanding funds before reopening of schools
4 hours -
We thank God for the 2024 general elections – Akufo-Addo
5 hours -
Coconut Grove Beach Resort marks 30 years of excellence with memorable 9 lessons & carols service
5 hours -
WAFU B U-17 Girls’ Cup: Black Maidens beat Nigeria on penalties to win inaugral tournament
6 hours -
Real Madrid beat Sevilla to keep pressure on leaders Atletico
7 hours -
Liverpool put six past Spurs to go four points clear
7 hours -
Manchester United lose 3-0 at home to Bournemouth yet again
7 hours -
CHAN 2024Q: ‘It’s still an open game’ – Didi on Ghana’s draw with Nigeria
7 hours -
CHAN 2024Q: Ghana’s Black Galaxies held by Nigeria in first-leg tie
8 hours -
Dr Nduom hopeful defunct GN bank will be restored under Mahama administration
8 hours -
Bridget Bonnie celebrates NDC Victory, champions hope for women and youth
9 hours -
Shamima Muslim urges youth to lead Ghana’s renewal at 18Plus4NDC anniversary
10 hours -
Akufo-Addo condemns post-election violence, blames NDC
10 hours -
DAMC, Free Food Company, to distribute 10,000 packs of food to street kids
11 hours