A top Senegalese official whose job is to settle conflicts has said the country is on a dangerous precipice after four days of protests left at least five young people dead.
Alioune Badara Cissé, known as the mediator of the republic, urged the authorities to stop threats and intimidation against protesters.
He also called for those on the streets to act peacefully and stop looting.
The unrest was triggered by the arrest of opposition leader Ousmane Sonko.
Mr Sonko appeared in court on Friday accused of disrupting public order. He also faces a rape allegation.
He denies the allegations and his supporters say the accusations are politically motivated.
The protests have also been fuelled by economic inequalities and concerns over young people's standard of living.
In a press conference on Sunday, Mr Cissé said the authorities "need to pause and speak with our youth" and warned that "we are on the verge of an apocalypse".
His statement came a day after a teenager in the southern city of Diaobe became the fifth person known to have died in clashes with security forces in various parts of the country.
But the respected mediator is warning of much more turmoil ahead unless the government acts fast to address the deepening poverty and lack of job prospects for the youth, says BBC World Service Africa Editor Will Ross.
On Friday, following violence in the capital, Dakar, and elsewhere, Interior Minister Antoine Felix Abdoulaye Diome vowed to use "all the means necessary for a return to order".
Speaking on national TV, Mr Diome accused Mr Sonko of "issuing calls to violence".
The opposition alliance known as the Movement to Defend Democracy (M2D), which is behind the demonstrations, has announced three further days of protests starting on Monday.
The West African regional group Ecowas has condemned the violence and called on "all parties to exercise restraint and remain calm" - adding that the authorities should "take the necessary measures to ease tensions and guarantee the freedom to demonstrate peacefully".
Mr Sonko, 46, was accused of rape in February.
Following an investigation he was arrested on Wednesday and taken to court accompanied by a group of supporters.
Police said they then arrested him for disrupting public order when he refused to change his route to the court.
Mr Sonko says the allegations of rape are fabricated. He accuses President Macky Sall of trying to remove potential opponents ahead of the 2024 election.
Two other opposition leaders were excluded from the 2019 election after being convicted on charges which they say were politically motivated.
There are reports that Mr Sall may seek to change the constitution to allow him to run for a third term.
Mr Sonko - who is particularly popular with young Senegalese - is the president's only remaining serious challenger, says BBC Afrique's Ndèye Khady Lo in Dakar.
In 2014 he founded his own political party, Pastef-Les Patriotes, and came third in the 2019 presidential election with 15% of the vote.