The Army has ruled Pakistan for more than half the country's 44-year history. Under Gen. Mohammed Zia ul-Haq, the last military ruler, Army rule became synonymous with martial law and partyless elections. Under Zia's leadership, the Pakistani Army became custodian of the country's Islamic identity and the nation's commitment to the Afghan jihad (struggle).

Less than four years after Zia's death in a mysterious air crash in 1988, other more-liberal views, reflecting the middle-class values of many in its officer corps, are emanating from the Army. The military leadership contrasts starkly with the political elite, which is still dominated by large landowners, tribal leaders, owners of large companies, and drug traffickers.

Army officials express frustration with politicians, but say they are committed to protecting democracy. "We would rather see the prime minister, the president, and the National Assembly taking decisions than us," a senior military official says."We are behind the prime minister. We talk the same language."

Mr. Sharif, despite being one of Pakistan's largest industrialists, is viewed as a representative of the urban middle class and a moderate on Islamic issues. The new alliance between the Army and the prime minister could isolate President Ghulam Ishaq Khan, who is perceived to be more radical and supportive of the religious groups.

A showdown has been looming between the Sharif government and the religious parties over a number of policies. The Army now says it wants to back the government in its effort to moderate fundamentalist influences in policymaking. Senior Army officials say those influences far outweigh their electoral support.

"They are fringe elements," a senior official says. "If it is good for the country, then it will be done whether they like it or not."

Army officials point out that the fundamentalists have only eight members in the 235-seat National Assembly. Those seats were largely secured, they add, through membership of the eight-party Islamic Democratic Alliance, which is dominated by the more moderate Muslim League.

The new signals have been accompanied by significant changes in the Army itself. Last month, Gen. Hamid Gul, regarded as a hero of Islamic militancy and the Afghan struggle, was fired. He had been a longtime rival of the present Army chief, Gen. Asif Nawaz Janjua.

The two men could not be more different. General Gul is home-grown and a known Zia loyalist. In contrast, General Janjua received his military training at Britain's Sandhurst academy.

Last month, Gul refused to take a post as head of an armaments factory. He had been transferred from commander of the armored corps in Multan, one of the most prestigious commands in the Army, and clearly viewed it as humiliating.

Gul had served as head of the country's military intelligence when the Afghan jihad was at its height. Under his tenure, millions of dollars worth of American weapons were channeled to radical Afghan groups. His removal from the Army was approved by the Sharif government.

The new civilian-military consensus and the removal of Gul brought immediate results. Last week, Pakistan announced that it was urging the Afghan mujahideen to support the United Nations program for peace. The announcement is seen as an indication that Islamabad is now willing to drop those radical Afghan guerrilla groups who oppose peace under the present terms. The decision ends a 16-year relationship of unquestioning support to the mujahideen.

"At last we have ditched the mujahideen, and the refugees will go home," said an opposition figure, voicing the view of many Pakistanis. The country has hosted about 4 million Afghan refugees for 13 years.

The change in policy brought an immediate response from the religious parties, however - in particular, the powerful Jamiat-i-Islami. Jamiat leader Qazi Hussein Ahmed now plans a series of nationwide rallies to whip up support for the Afghan jihad and the struggle over disputed Kashmir.

Afghanistan was not the only point of confrontation between the government and fundamentalists. Pressure has been mounting from the religious right to Islamicize the economy and banking system. This followed a recent ruling from the country's Islamic-law court that in future the payment or charging of interest is forbidden. The ruling declared all interest to be riba (usury), which is forbidden by the Koran.

The ruling, which becomes law in June unless overturned by the Supreme Court, has thrown Pakistan's banking sector into panic. Foreign-aid donors say the system is unworkable and would end development aid. The country relies on foreign aid for most of its development budget. Foreign investors are already withdrawing from major projects.

The riba issue brought out protests from closet liberals. Two Cabinet ministers declared the ruling would bankrupt Pakistan and cause a financial collapse. Sardar Asif Ali, minister for economic affairs, complained that a "climate of fear" pervaded policy, preventing moderates from speaking out.

There are further tests ahead. On Feb. 11, Kashmiri militants plan to cross the line of control between Indian-held Kashmir and the Pakistani side.

Two years ago, when a similar crossing occurred, the result was several deaths and heightened tension between the two countries. Army officials now say they have no intention of allowing the march to reach the disputed area.

With the battle lines already drawn between the fundamentalists and the Army, few observers believe the religious groups will accept the challenge and take on the Army politically. "They know they'd be dead in the water if they did that," one liberal comments.

The emergence of the Army in the name of moderation has been welcomed by many liberals, but it is a welcome tinged with irony.

As a leading liberal commentator remarked: "It's good, all good, but a shame it had to come from the Army and not the people of Pakistan and the ballot box."