The new Solomon Islands Prime Minister Snyder Rini, whose election last week triggered widespread rioting in the capital Honiara, has resigned.
Opposition supporters rejoiced on hearing of Snyder Rini's departure
He announced he was quitting just before MPs were due to vote in a no-confidence motion against him.
Mr Rini confidently predicted he would win the vote, but some of his key backers switched sides in recent days.
His resignation was greeted with jubilation in Honiara, where people honked car horns and cheered.
"People are very excited that Rini has gone [and] are looking forward to getting rid of the old leaders in the old government," 38-year-old farmer, Samson Maneka, told the Associated Press.
"The majority of Solomon Islanders are happy with this change."
Mr Rini, who was deputy prime minister in the previous government, announced he had "no alternative" but to tender his resignation.
He said he was stepping down, "so all MPs can come together so this country can go forward".
The country's 50 MPs, voted into office in 5 April general elections, elected Mr Rini as prime minister in a secret ballot last Tuesday.
His election prompted mass protests by people who accused him of being linked to corruption allegations that dogged the last government, and favouring wealthy Chinese businessmen.
Snyder Rini denies bribing MPs with Chinese and Taiwanese money
He was also accused of using money from Chinese and Taiwanese backers to bribe MPs into voting for him, charges he denied.
In the two days of rioting that followed, much of Honiara's Chinatown was burned to the ground and its businesses looted.
Heavily armed Australian-led peacekeepers continue to patrol the battered streets of Honiara.
As Wednesday's no-confidence vote approached, several key allies joined the opposition ranks to make Mr Rini's defeat certain.
The MPs will now hold another ballot to replace Mr Rini. This is expected to take place next week.
The government is yet to announce its candidate, though the opposition has put forward former Prime Minister Manasseh Sogavare.
The race is likely to be close, with both the government and opposition holding 25 seats each in parliament.
Mr Sogavare said if elected he would consider reviewing the Solomons' diplomatic recognition of Taiwan, rather than China.
The islands are one of about two dozen countries that recognise Taiwan, which offers aid to Pacific nations that forego diplomatic links with its rival China.
Australia's Foreign Minister, Alexander Downer, said the vote for a new leader must be honest and transparent.
"I'd like to feel that the members of the parliament of the Solomon Islands are able to vote unencumbered and without inappropriate incentives, if you know what I mean and I'm sure you do," he said.
Following his resignation, Mr Rini was rushed out of parliament by armed police who drove him away.