Japan's Prime Minister Yukio Hatoyama sowed the seeds of his own political destruction during the election campaign which brought him to office less than nine months ago.
He made a promise which proved impossible to fulfil - to tear up a US-Japan deal to relocate an American military base within Okinawa, and move it off the island or maybe even out of Japan.
It was only once he was in office that the fatal flaw became apparent.
The prime minister had not worked out where the base could go instead.
He appeared to dither for months, putting a strain on the US-Japan alliance, critical to Japan's security and the balance of power in Asia.
Every possible alternative raised objections, either from people living nearby or from the United States on operational grounds.
Finally, Mr Hatoyama admitted the base would have to stay on Okinawa after all.
When he went to the island to explain his decision to local leaders, protesters picketed the meeting, many holding placards bearing a single character - the one the Japanese use to write the word "anger".
Members of Mr Hatoyama's party feared if he remained in charge they faced certain defeat in mid-term elections to the upper house of the Diet next month.
The government needs to maintain a majority in the less powerful chamber to avoid legislative deadlock.
The calls for the prime minister to go grew louder and now he has agreed to resign.
This was not how it was supposed to be.
Yukio Hatoyama came to power last year with a landslide election victory, ending half a century of almost unbroken conservative rule in Japan.
His centre-left Democratic Party of Japan (DPJ) promised a new era of transparent politics.
The prime minister wanted a more equal alliance with the United States and to improve Japan's relationships with its neighbours with the long term goal of a European style Asian Community.
At home he pledged that politicians would govern, not the bureaucracy, which Mr Hatoyama said had too much control.
But the festering row over the base took up much time, and scandals over money quickly eroded public confidence.
The prime minister's credibility took a knock when it emerged his heiress mother had been funnelling millions of dollars into his campaigns.
Mr Hatoyama said he knew nothing about it before the investigation.
Two of his aides received suspended prison sentences for falsifying political contribution reports.
Ichiro Ozawa, the DPJ's secretary-general known as the "Shadow Shogun" because he was widely believed to wield the real power in Japan, was questioned twice by prosecutors over a land deal.
He is now resigning too.
Enormously wealthy, Mr Hatoyama was always an unlikely revolutionary.
His family is so prominent it has been called Japan's answer to the Kennedys.
One of his grandfathers was prime minister, the other founded Bridgestone Tyres.
Mr Hatoyama's aloof, professor-like manner earned him the nickname "the Alien".
The Democratic Party of Japan is expected to choose a new leader, and prime minister, on Friday.
It is acting quickly hoping to draw a line under a disappointing first few months in power.
The front runner is the Deputy Prime Minister and Finance Minister Naoto Kan.
He is seen as outspoken and independent minded and made his reputation in the 1990s by exposing a bureaucratic cover-up of a scandal over haemophiliacs being given HIV-tainted blood.
Another contender is Katsuya Okada, the foreign minister.
But his involvement in discussions over the American base issue may hinder his chances.
The Transport Minister Seiji Maehara would be a younger, telegenic choice.
Whoever wins may have little time to get to grips with the deep structural problems afflicting Japan - the biggest national debt in the industrialised world, an ageing and declining population.
Japan has now had four prime ministers in as many years.