ISLAMABAD, Pakistan - Pakistan's exiled former military ruler Pervez Musharraf, who became a key US ally during the "war on terror", died in a Dubai hospital on Sunday aged 79 after a long illness.
Musharraf seized power in a 1999 bloodless coup and was acting simultaneously as Pakistan's army chief, chief executive, and president when the 9/11 attacks on the United States took place.
The general twice suspended the constitution and was accused of rigging a referendum shoring up his power, as well as rampant rights abuses including rounding up opponents.
Nonetheless, he became Washington's chief regional ally during their invasion of neighbouring Afghanistan.
The decision -- made after the US issued a "for us or against us" ultimatum -- put him in the crosshairs of Islamist militants, who made several attempts on his life.
But it also earned Pakistan a huge influx of foreign aid which bolstered the economy.
- Rare illness -
In Pakistan, where the military remains supremely powerful and enjoys significant support, Musharraf is a divisive figure.
"There was good in him," 69-year-old Naeem Ul Haq Satti told AFP in an Islamabad marketplace.
"But his one act, which will be remembered throughout history, was he violated the constitution," the retired civil servant added. "The most important thing a country has is its constitution."
Musharraf had been suffering from a rare disease known as Amyloidosis and last summer his family said he had no prospect of recovery.
Senior military chiefs "express heartfelt condolences on sad demise of General Pervez Musharraf", a brief statement released by the military's media wing said Saturday.
The four-star general died in hospital in Dubai on Sunday morning, according to media reports and a senior security official who spoke to AFP.
"I can confirm that the late general breathed his last in Dubai this morning ... He is no more," the official, who asked not to be named, told AFP.
A Pakistan air force source told AFP that Musharraf's body would be flown back to Pakistan on Monday, aboard a civilian liner or UAE air force jet.
Musharraf ruled Pakistan for nearly nine years, starting when then-Prime Minister Nawaz Sharif attempted to remove him as army chief.
Many Pakistanis handed out sweets to celebrate his 1999 coup, which ended a corrupt and economically disastrous administration, and soon turned on the tap of foreign aid.
"Pakistan's decision under Musharraf to join the war against terror turned out to be a boon," analyst Hasan Askari told AFP.
But his easygoing persona failed to mask the blurring of the division between the state and army, and Musharraf fell out of favour after trying to sack the chief justice and failing to control an unravelling economy.
He famously said the constitution "is just a piece of paper to be thrown in the dustbin" -- and implemented emergency rule when a bid to sack the country's chief justice sparked months of protests.
After the December 2007 assassination of opposition leader Benazir Bhutto, the national mood soured even more and crushing losses suffered by his allies in the 2008 elections left him isolated.
He resigned that same year and was forced into exile.
- Failed return bid -
Musharraf's plan to return to power in 2013 was dashed when he was disqualified from running in an election won by Nawaz Sharif -- the man he deposed in 1999.
He was charged over the slaying of Bhutto and placed under house arrest as a series of cases against him were brought before the courts.
In 2013 Human Rights Watch urged the government of the day to hold him accountable for "widespread and serious human rights violations" during his rule.
In 2016 a travel ban was lifted and Musharraf flew to Dubai to seek medical treatment.
Three years later, he was sentenced to death in absentia for treason, related to his 2007 decision to impose emergency rule. However, a court later nullified the ruling.