This marked a turning point and unleashed several days of chaos and violence that killed at least nine people and injured more than 200, with dozens of Rajapaksa loyalist homes set on fire.
Mahinda has since fled the capital Colombo and taken refuge at the Trincomalee naval base on the country's east coast.
A court banned him, his politician son Namal, and more than a dozen allies from leaving the country on Thursday after ordering an investigation into the violence.
Security forces patrolling in armoured personnel carriers with orders to shoot looters on sight have largely restored order.
A curfew was lifted Thursday morning -- only to be reimposed after a six-hour break allowing Sri Lanka's 22 million people to stock up on essentials.
Sri Lankans have suffered months of severe shortages of food, fuel and medicines and long power cuts after the government, short on foreign currency to pay its debts, halted many imports.
The South Asian island nation's central bank chief warned Wednesday that the economy will "collapse beyond redemption" unless a new government was urgently appointed.
Wickremesinghe, 73, is seen as a pro-West free-market reformist, potentially making bailout negotiations with the International Monetary Fund and others smoother.
The main opposition SJB party was initially invited to lead a new government, but its leader Sajith Premadasa insisted that the president should first step down.
In recent days the party has split, with a dozen MPs from the SJB now pledging support to Wickremesinghe.
With many from Rajapaksa's party having defected in recent months, no group in the 225-member assembly has an absolute majority, making parliamentary approval of the unity government's legislation potentially tricky.
Rajapaksa was set to meet with party leaders on Thursday as more names have been suggested for the post of prime minister, an official close to the negotiations told AFP.
But Wickremesinghe has already been working closely with Rajapaksa to shake up the finance ministry and the central bank to make sweeping fiscal and monetary policy changes, the source said.
'We can't wait'
The central bank almost doubled key interest rates and announced a default on Sri Lanka's $51-billion external debt as part of the policy shift, officials said.
Front-line opposition legislator Harin Fernando from the SJB said he decided to remain neutral because the party's leader refused to form a government as long as Rajapaksa remained president.
"We can't be imposing conditions that cannot be fully met. First, we must address the economic crisis. We need at least $85 million a week to finance essential imports. We must collectively find a way to raise this money urgently," Fernando said.
He said he expected a unity government to be formed on either Thursday or Friday. "We can't wait any longer," he added.