Snyder Rini, the new Solomon Islands prime minister whose election last week sparked two days of rioting and looting in the capital, resigned Wednesday after losing support in Parliament.
Rini announced his resignation just before lawmakers in the troubled South Pacific nation were due to vote on a motion of no confidence in the prime minister.
He told members of Parliament he was quitting "so all MPs can come together so this country can go forward."
The announcement triggered scenes of jubilation on the streets of Honiara with several hundred traders and shoppers at the city's central market cheering and waving palm fronds in celebration.
In recent days, Rini had confidently predicted he had enough support to defeat the motion and remain in office, but on Wednesday morning, some 29 lawmakers sat on the opposition benches. The parliament is made up of 50 lawmakers, two of whom are in jail awaiting trial on charges linked to last week's rioting.
The lawmakers now will have to vote in a secret ballot for a replacement to Rini.
Government spokesman Johnson Honimae said nominations were expected later Wednesday but no vote was expected before next week.
Rini was rushed out of parliament after his resignation flanked by armed police who pushed him into an SUV and drove him away.
There was no reaction outside of parliament, which has been shut off to the public by hundreds of riot police and armed Australian and New Zealand troops since the riots last week.
Police said that looters likely also targeted the area because its stores had the most goods to steal.
Just ahead of Rini's announcement, opposition leader Job Dudley Tausinga told The Associated Press he was "100 percent confident we'll have it in our favor," after sympathizers from the government joined their ranks.
Tausinga is now one of the favorites to take the prime minister's job.