Lawmakers reinstate Sonko and elect him speaker with overwhelming support in Senegal's legislative body.
As speaker, Sonko could use his position to challenge the policies of the president, his one-time ally.
The move by speaker El Malick Ndiaye clears the way for sacked premier Ousmane Sonko to run for head of parliament.
The renewed instability could complicate bailout negotiations with the International Monetary Fund.
Supporters of Senegalโs ousted prime minister have rallied outside his home in Dakar.
Bassirou Diomaye Faye also dissolved the government, creating uncertainty amid a debt crisis in the country.