|Musharraf has been a key ally of George Bush and his 'war on terror' [File: EPA]|
When asked in an interview with Al Jazeera's Darren Jordan early in 2007 what he would like his legacy as president of Pakistan to be, Pervez Musharraf said he wanted to be remembered as a "reformer and developer".
"[Pakistanis] must remember me as a reformer and developer, someone who saved them from catastrophe and introduced sustainable democracy," he said.
"That is what I would like to be remembered for."
As Musharraf sought re-election in January 2008, many of his political opponents claimed that catastrophe was what his continued leadership would usher in.
Now, Musharraf has declared a state of emergency in Pakistan, days before the country's supreme court was to rule on his future as the country's top elected leader.
The authorities cut communications, and deployed security forces in the capital Islamabad.
Iftikhar Chaudhry, the chief justice whose earlier suspension in March marked the beginning of a slide in Musharraf's popularity, was sacked for not signing the emergency order.
The supreme court earlier ruled that Musharraf could stand for re-election and the general said he would step down from his military post and restore civilian rule if he won.
However, he also declared he would remain the army's chief-of-staff if he failed to win the presidency.
Musharraf has seen his popularity suffer several setbacks in 2007. He was initially forced to reinstate Chaudhry as chief justice, and has faced criticism for his handling of a deadly siege at the Red Mosque in Islamabad.
But opposition is something the 64-year-old has got used to since he came to power in a bloodless coup in 1999.
He has survived three assassination attempts and, perhaps quite aptly, his memoirs, published last year, are entitled In the Line of Fire.
After he ousted Nawaz Sharif, the then prime minister, from power, he promised he would bring "true democracy" to Pakistan.
|There have been growing opposition |
protests against Musharraf [AFP]
Bill Clinton, the US president at the time, described the coup as "another setback to Pakistani democracy", and said "Pakistan's interest would be served by a prompt return to civilian rule and restoration of the democratic process".
But despite this initially frosty response, Musharraf's presidency has benefited greatly from his close ties with Washington.
After the September 11 attacks, Pakistan became a key ally of the Bush administration in its "war on terror" and Musharraf launched a major crackdown on perceived religious extremists, particularly in the country's rugged northwest.
That policy has caused some in Pakistan's remote provinces to label him a traitor.
Shortly after the coup in 1999 Musharraf consolidated his grip on power by requiring all judges to swear a new oath of allegiance to the military. Many stood down in protest.
The supreme court, now filled with loyalists, declared new elections were to be held by October 2002. Prior to those general elections, Musharraf held a referendum on April 30 that extended his presidential term by five years after the vote in October.
The referendum was boycotted by opposition parties claiming that the vote was rigged. They then virtually paralysed the national legislature for over a year.
The origins of the current legal spat between Musharraf and his opponents is grounded in his decision to remain as the head of the military after the end of 2004, despite saying he would relinquish the post.
In his memoirs he explains the decision to go back on his word.
"Removing my uniform would dilute my authority and command when both were required the most. Therefore I decided to go against my word," he said.
Musharraf has previously said he would stand down as president if he ever lost popular support in Pakistan.
Despite protests from lawyers supportive of the chief justice, the legal challenges by his political opponents and the unrest in Waziristan and other northwest provinces, he maintains he still has popular support.
In an interview with Al Jazeera in April, Musharraf said that events in his country must be put in perspective and that people must be cognizant of the large number of different groups and religious minorities in Pakistan.
"The protests have never been more than 5,000 people," he said. "And people must realise they [the opposition] have politicised a legal issue."
During his tenure, Musharraf has introduced positive developments. Relations with India have improved drastically and a generally independent media scene has been allowed to flourish.
|Musharraf's relations with Iftikhar Chaudhry |
have been strained [File: AFP]
Born in Delhi in pre-partition India in 1943, Musharraf is a lifelong military man and rose up the ranks to be appointed army chief of staff, over other senior officers, by Nawaz Sharif in 1998.
However, relations between the two soon soured. The Kargil conflict in Kashmir in 1999 sparked tensions between the civilian government and the military.
After Sharif decided to remove him from his position, Musharraf carried out the bloodless coup that brought him to power.
Although Musharraf has reportedly dropped criminal charges against Bhutto, no such amnesty has been extended to Sharif.
Attempting to return from exile in London recently, he was immediately put on another aircraft out of Pakistan to Saudi Arabia.
Before settling in Karachi, Musharraf spent some of his childhood in the Turkish capital, Ankara, and speaks Turkish fluently.
He is married with two children and four grandchildren.