Since President Pervez Musharraf seized power in a bloodless coup in 1999, the paradoxes of his rule in Pakistan have become more marked.
He has reintroduced parliamentary government, but the National Assembly was paralysed for months because the opposition refused to recognise the constitutional changes he had pushed through.
General Musharraf - came to power as head of the army
In December 2003, as part of a deal with hardline Islamists to end the stand-off, Gen Musharraf said he would step down as military head of the country by January 2005 and give up some of the powers he assumed after the coup.
But many now doubt that he will fulfil that pledge. Officials are arguing that the changed situation in the country requires him to retain both his posts.
He has declared himself the implacable foe of Islamic extremism, but a Muslim alliance sympathetic to the Taleban was voted into power in one of Pakistan's four provinces, and leads the governing coalition in another.
Gen Musharraf is wooed and feted by US President George W Bush, who needs him in the so-called war on terror.
Yet Islamabad is worried that Mr Bush is now prepared to let Israel sell hi-tech defence equipment to Pakistan's nuclear rival, India, that could tilt the military balance between the two traditionally hostile neighbours.
The pivotal moment in Gen Musharraf's presidency was 11 September, 2001.
Washington suddenly realised it needed Pakistan on side if it was to defeat the Taleban in neighbouring Afghanistan.
The man who was denounced as a tin pot dictator by many in the West when he ousted then Prime Minister Nawaz Sharif became, almost overnight, a pivotal player on the world stage, a close ally welcomed in Washington and London alike as a statesman of international standing.
On top of that, of course, he is also one of the few men in the world with his finger on a nuclear button.
Rising through the ranks
Pervez Musharraf was born in Delhi in August 1943.
His family emigrated to Pakistan during the partition of the Indian sub-continent.
His rise through the ranks came despite the fact that he does not belong to the predominantly Punjabi officer class of the Pakistani army - but to an Urdu-speaking family in Karachi.
He began his military career in 1964.
The president likes to convey a non-military image
Gen Musharraf rose to the top job in 1998 when Pakistan's powerful army chief, Gen Jehangir Karamat, resigned two days after calling for the army to be given a key role in the country's decision-making process.
It was the first time an army chief of staff had ever stepped down and many observers took it as a sign that Prime Minister Sharif's political power had become strong enough to secure the long-term future of civilian administrations.
When Pakistan came close to war with India over Kashmir in 1998, Gen Musharraf was regularly seen briefing the media and making appearances on state television.
On the quiet, he and other senior generals were reportedly increasingly angry at the prime minister's attempts to find a diplomatic way out of the crisis.
Mr Sharif's moves led to speculation that the military did not have the full political backing of the government and he eventually ordered a full withdrawal of troops from Indian-held territory at Kargil.
When, in October 1999, Mr Sharif tried to fire him, Musharraf seized power promising to bring "true" democracy to Pakistan.
Any hopes that his takeover might herald a stabilisation in ties with India - or even a new start - appeared misplaced in the first 20 months of his rule.
Tension on the sub-continent initially increased markedly - with both sides adopting hostile positions.
The hijack of an Indian Airlines plane to Afghanistan in 1999 - which India blamed on Pakistani-backed groups - and a rising tide of violence in Kashmir plunged relations to a new low.
In July 2001, Gen Musharraf held his first summit meeting with then Indian prime minister Atal Behari Vajpayee at Agra - but failed to make much headway in the Kashmir dispute, the cause of most differences between the two countries.
Before going to India, he had named himself president in a bid to consolidate his grip on power.
And then came 11 September.
Reversal of fortune
Washington quickly reversed its position on Gen Musharraf as soon as it became clear that his support was crucial.
President Bush promised more than $1bn in aid as a reward for the support of Pakistan one of the only countries in the world formally to recognise the Taleban.
President Musharraf's position was a difficult one, caught between the need to accommodate US interests and prevent a radicalisation of Muslim groups at home.
But he headed off the threat of mass protests by ordering the arrest of several militant leaders.
Once the Taleban had been ousted, the general offered all possible help to the new government. But relations have been difficult, with Afghans blaming Pakistan for doing little to stop Taleban forces from launching attacks in Afghanistan from across the border.
For much of 2002 President Musharraf was engaged in brinkmanship with Mr Vajpayee, that had many people fearing a nuclear war.
The trigger was an attack on the Indian parliament in Delhi in December, 2001. India blamed the attack on Kashmiri militants backed by Pakistani intelligence, which President Musharraf has categorically denied.
Pakistan responded to India's gradual military build-up along the border until the two sides had amassed more than a million troops in the region.
Musharraf: Feted by George Bush
Tension have since lowered and the two sides began peace talks in early 2004.
Critics argue that during President Musharraf's period in power there have been times when cross-border militancy from Pakistan has been reduced.
But it is not clear if the general could eradicate it completely, given the nature of terrain in Kashmir and the support the militants have among many Pakistanis.
Within Pakistan itself, sectarian violence is an increasingly serious problem for Gen Musharraf as extremists on both sides of the Sunni-Shia Muslim divide resurface.
Forum for discontent
In November 2003 Pakistan's National Assembly met for the first time since the coup three years earlier.
It was a key moment in Gen Musharraf's promise to restore democracy.
It followed a controversial referendum in April 2002 - where voters agreed to extend his rule for five years - and general elections that October.
But parliament was for months little more than a forum for a coalition of secular and religious opposition parties who refuse to accept a raft of constitutional amendments President Musharraf pushed through without parliamentary approval.
The amendments, known as the Legal Framework Order (LFO), gave the general the power to sack the prime minister, dissolve parliament and also recognise him as both head of the army and head of state.
The opposition insist the provisions of the LFO are unconstitutional and that they are not legally binding as parliament did not approve them. As a result, the business of parliament was in deadlock until the deal in early 2004.
President Musharraf has frequently set out his vision of a modern, tolerant, democratic, Islamic Pakistan.
It remains to be seen how far he can take Pakistan down that route before his time in power ends.