The Pakistan Military Academy in the northwestern town of Abbottabad, which produces the officers who run the army, is a secular institution. Cadets at the PMA are not only taught war strategies and the use of weapons, they are also taught Western table manners and dress codes. All subjects are taught in English, and the cadets are encouraged to speak English with one another rather than their national language, Urdu.
The Pakistani army values its ties with British and American military institutions, and most senior officers spend at least some time at these institutions before they become generals.
Religious influences began to spread into the armed forces during 1979-89, when the Russians occupied Afghanistan and Pakistan become the front-line state in the 10-year war.
Since most Muslims saw the communists as non-believers, even anti-God, they opposed the Soviet invasion of a brotherly Muslim country.
Pakistan and its allies in the Afghan war, particularly the United States and Saudi Arabia, decided to use these religious sentiments to fight the Russians in Afghanistan. The first move was to enlist Pakistani religious groups. Soon Muslim militants from all over the world were also invited to join this holy war.
The Pakistani military was given the task of training the militants, and while it taught them how to use weapons, many in the army were influenced by the religious zeal of the militants.
The army also found it convenient to send the militants to fight and die in Afghanistan, rather than sending its own troops.
When the Russians left Afghanistan 1989, the Pakistani military establishment retained the jihadi card, using it against India in the disputed Kashmir region. Although this convenient relationship between the military and religious militants received a major hold on Sept. 11, 2001, when al-Qaida launched massive terrorist attacks inside the United States, it did not break.
The army was convinced that in a war with India, it will not be able to stop numerically and technically superior Indian troops and wanted to retain jihadi cadres as its second line of defense. But this mullah-military alliance was no longer acceptable to the international community. So Pakistan faced tremendous pressure from all sides to stop supporting religious zealots.
The army was unwilling to do so, also because this relationship has translated into a political alliance inside Pakistan, which enabled the army to use religious parties -- such as JUI (F) and Jamaat-e-Islami -- to beat back secular politicians.
So when President Gen. Pervez Musharraf, who came to power after toppling an elected government in 1999, held controlled elections in Pakistan, it did not hurt him to have an alliance of 11 religious parties, known as MMA, in the new Parliament.
Despite its declared opposition to Musharraf, the alliance helped him get re-elected by the new Parliament.
The alliance's impressive victory in the 2002 elections -- when MMA become the first religious outfit ever to emerge as the second-strongest group inside the Parliament -- also helped Musharraf in isolating mainstream secular political parties opposed to his rule. But this was no unilateral favor. Musharraf's decision to keep the country's two main politicians -- former prime ministers Benazir Bhutto and Nawaz Sharif -- out of Pakistan and out of the electoral process helped MMA win scores of additional parliamentary seats in the 2002 elections.
Meanwhile, Musharraf also continued his strong alliance with the United States, where he is often praised as "an indispensable partner" in the war against terror. Somehow, Musharraf maintained close relations with both the United States and Pakistani religious groups till 2006. But a peace accord he signed with tribal leaders of North Waziristan in September 2006 brought new strains on his relations with the United States.
The agreement did not achieve what Musharraf had hoped: marginalizing al-Qaida and Taliban extremists without annoying their tribal supporters.
Ultimately, his policy of appeasing both the United States and religious militants failed to satisfy either. The first to go were the militants, who have made at least half a dozen attempts to kill Musharraf. Soon, the Americans also started to ask Musharraf to stop appeasing the militants and take decisive military action against them.
U.S. officials also warned Musharraf that his deal with the tribal chiefs had failed and the terrorists had exploited his decision to pull back Pakistani troops from the tribal area and had begun rebuilding a network largely dismantled during the U.S.-led invasion of Afghanistan.
The pressure forced Musharraf to take action against the militants, including the raiding of Islamabad's Red Mosque last month in which hundreds of students of a religious seminar are believed to have died. The raid made Musharraf realize two things: His alliance with religious elements can no longer continue, and Pakistani religious parties are not as strong as he had thought, as there was no major public reaction against the military action.
While looking for new allies, Musharraf turned to Bhutto, a politician he had denigrated as "corrupt" and "incompetent."
At a meeting in Abu Dhabi, Musharraf and Bhutto discussed the outline of a plan for power-sharing. While talking to reporters in New York Saturday, Bhutto acknowledged she had discussed a "package" with Musharraf but said the talks did not proceed further as Musharraf wants to remain the chief of the army staff as well as president.
Bhutto indicated she was not against accepting Musharraf as president, but he will have to first resign from the army and then continue as a civilian leader.
Both sides have acknowledged they are still discussing the package.
Whether Musharraf and Bhutto make a deal or not, it is obvious Musharraf is looking for new partners before the new elections, due later this year.
And it is also obvious that now the Pakistan army needs moderate allies, not mullahs, because it feels that both international and domestic situations go against a mullah-military alliance.