King Gyanendra had always relied on Nepal's army to back him up, but it was his generals who finally brought an end to his absolute rule.
According to senior sources close to the secret negotiations that saw the king hand power back to his democratic opponents this week, army chiefs went to the opposition and asked them to form a government.
As Madhav Kumar Nepal, the leader of the second largest party, put it shortly before the deal was announced: 'You know Kathmandu is a small city and people can communicate.'
The top brass, apparently, had decided to look to their own future rather than shoot their protesting countrymen in a lost cause.
Losing the confidence of the traditionally loyal army was King Gyanendra's final failure. He had already alienated most other sections of society.
On February 1, 2005, he seized power in an army-backed coup, saying that democratic politicians had failed to confront a Maoist rebellion which began in 1996 and had spread to dominate rural areas.
Though he spoke of democracy and holding elections, he sent soldiers into newsrooms, locked up democratic leaders, cut mobile phones and banned protests to suppress dissent.