Pakistan's military has directly and indirectly managed the country's affairs for more than half the period of its independence.
By Mahmud Ali
BBC South Asia analyst
Military influence has been strong for several historical reasons.
Pakistan's army has dominated the country's affairs
When Pakistan emerged as a sovereign state in August 1947, it brought together disparate Muslim-majority provinces of the former British colony with limited experience of integration.
No civilian-political institution existed at the time of independence, other than the imperial bureaucracy and military.
Being a country shaken at its birth by the bloody riots marking Partition, Pakistan's early years were a time of efforts to build everything from scratch.
With resources in short supply, expectations raised by heady rhetoric and a largely inexperienced political elite, Pakistan soon became dependent on the two best-organised institutions.
They were the civilian and military bureaucracies.
The political elite's standing eroded after the death of Pakistan founder and Muslim League leader, Mohammad Ali Jinnah, in 1948, and the assassination of his successor, Liaquat Ali, shortly afterwards in an abortive coup.
Only national institution
In a country riven by ethnic and sectarian divisions, the military, dominated by the majority Punjabi and influential Pashtun communities, saw itself as the only truly national institution.
The army filled the void of a civilian political institution
Its long stints in power during which civilian institutions were stunted have given it the ability to subvert civilian institutions.
This power grew significantly after military dictator General Zia ul-Haq helped US President Ronald Reagan's war against Soviet forces in Afghanistan.
At this time Islamists secured their position in the elite and encouraged their cadres to join the army as officers.
This resulted in a polarisation between religious and secular schools that would divide the force for years.
Pervez Musharraf's coup in 1999 strengthened the secular tendencies in the army, but has not guaranteed its permanence.
The domestic political consequences of Islamabad joining the war on terror, the withdrawal of Inter Services Intelligence support from the Taleban and militants fighting in Kashmir, and the sectarian violence across Pakistan, mean that national politics remains febrile, and stability fragile.
The army's hold is being contested in many areas, and this is often viewed by the establishment as a threat to national integrity.
President Musharraf's army rule has met some resistance
Given the history of coups, President Musharraf and his team will do everything they can do under the law to erase the symptoms if not the malaise itself.
That would explain the arrest of the leader of the Alliance for the Restoration of Democracy (ARD), Makhdoom Javed Hashmi, detained on 29 October 2003 and accused of defaming the military.
Role of the US
The Pakistan army also grew in size, strength and influence because of assistance from the US.
In 1953, the US, in its efforts to build a bulwark south of the Soviet Union, signed several military agreements with countries in the region, including Pakistan.
Large sums of money and military supplies started arriving and continued to do so until the second India-Pakistan war in 1965.
Initially, the civil and military bureaucracies worked as partners, but since General Ayub Khan's first period of martial law in 1957, the civil service has played second fiddle.
The bureaucrats provide the brains, as it were, to the army's brawns, in running the country.
General Khan's so-called decade of development saw stability and growth.
But the defeat in the 1965 war led to the army's invincibility being challenged by an increasingly vocal opposition.
This became a surge after his protege, Zulfikar Ali Bhutto, deserted him and established the Pakistan People's Party.
In 1969, protests spearheaded by students led to a second takeover - by General Yahya Khan, the army chief.
His efforts to restore democracy and introduce a universal adult franchise showed up Pakistan's inner contradictions.
The majority-province of East Pakistan elected a party demanding provincial autonomy to what should have been a clear majority in Pakistan's legislature.
The refusal by Mr Bhutto and the army to accept this led to violent resistance in East Pakistan.
This led to a military crackdown, civil war, Pakistan's military defeat and the emergence of Bangladesh.
General Zia-ul Haq helped the US against the Soviets in Afghanistan
The dishonour and shame suffered by the army has never been forgotten.
However, failings by Mr Bhutto allowed the army a way back to power.
His increasingly authoritarian rule gave rise to growing political opposition, giving the army a handle.
Mr Bhutto's ousting in 1977 and execution in 1979 showed the army's capacity to topple elected leaders.
Mr Bhutto, ironically, was himself partially responsible for restoring the military's influence.
He deployed the army and the air force to fight a feudal-tribal-Marxist guerrilla force in Balochistan Province.
And he encouraged young PPP cadres to join the force as officers, although this was not looked upon by senior generals particularly favourably.