Pakistan's military leaders fell in line today with Prime Minister Nawaz Sharif's controversial agreement to withdraw support for Islamic guerrillas battling Indian troops inside India's portion of Kashmir, despite continuing expressions of dismay and resentment over the deal from many sectors of Pakistani society.

In an effort to show cohesion among civilian and military officials at a time of growing speculation that Sharif might be heading for a showdown with the powerful armed forces, Pakistan's army chief joined other top government aides in expressing "satisfaction" at the statement the premier made with President Clinton last weekend.

In the Washington agreement, Sharif effectively agreed to ask the guerrillas to retreat in exchange for Clinton's pledge to take a "personal interest" in solving the long-standing problem of Kashmir. The Himalayan region has been split into Indian and Pakistani sectors for half a century, and the neighboring countries have fought two wars over who should rightfully possess it.

Sharif is to address the nation on television Saturday and is expected to announce a plan for gradually withdrawing support for the militants. He returned to Pakistan on Thursday under unusually heavy airport security and has made no public comment since meeting with Clinton.

A force of between 500 and 1,000 fighters has occupied strategic ridges in the Kargil section of Indian Kashmir since late April, and Indian forces have been fighting since then to evict them. While springtime skirmishes in Kashmir are common, the current conflict raised fears in Washington and other world capitals because of its large scale and because India and Pakistan tested nuclear weapons last year.

Pakistani officials and the militants' leaders say the attackers are Islamic freedom fighters, known as mujaheddin, for whom Pakistan has provided shelter, assistance and training for the past decade. But Indian and American officials say Pakistani troops have participated in the incursion.

While responding positively to Sharif's agreement today, the members of his cabinet defense committee praised the guerrillas--who repudiated the Sharif-Clinton agreement on Wednesday--for their "valiant and courageous actions" in defending the "sacred cause" of Kashmiri freedom. They also emphasized the importance of Clinton's new role in the search for a solution to the Kashmir dispute.

"Pakistan should appeal to the mujaheddin to help resolve the current Kargil situation and to provide an opportunity to the international community to play an active role" in seeking a solution for Kashmir, the committee members said in a statement. "The responsibility of the international community now is to emphatically assert itself on the side of the Kashmiri people."

While today's statement appeared to put to rest any fears of an immediate military revolt, it did little to allay popular indignation and concern over what many Pakistanis see as Sharif's abrupt abandoning of the Kashmir rebel cause.

"In the popular perception, this is a sellout," said Khalid Mahmud, an analyst of Indo-Pakistani relations at the Center for Regional Studies. "We don't foresee mass upheaval but, yes, there is widespread resentment, yes, this could bring a split in the establishment and, yes, it has strengthened the hands of extremist groups."

At mosques across Islamabad and the nearby city of Rawalpindi, where Muslims were gathered for Friday prayers, many worshipers expressed strong feelings about the crisis.

"We all want peace, but how long have we been fighting in Kashmir, and how many people have died there, while the Americans did nothing to help their cause?" demanded a tailor outside a mosque in Rawalpindi. "Now Clinton says we must leave that place and have some table talk, and our prime minister agrees. This is not fair."

Resentment within the military establishment seems especially high. Unlike in India, where every soldier killed in the recent fighting has been received with full military honors and the national press is full of patriotic fervor, here many dead fighters are sent home quietly and nationalistic rhetoric has been muted--largely because the government still officially denies direct involvement in the conflict.

"Kargil gave everyone a false sense of achievement," said Mirza Aslam Beg, a former army chief of staff who now heads a nonprofit research institute. "The government made so many boastful claims, and now suddenly it has all collapsed in a matter of days."

CAPTION: A boy holds a toy gun and a photo montage depicting Pakistani Prime Minister Nawaz Sharif in President Clinton's arms. The caption reads "Quit Kargil. I will give you candy."

CAPTION: Hundreds of demonstrators, burning Sharif in effigy, gathered in the streets of Lahore to protest his promise to Clinton to withdraw militants from the disputed region of Kashmir.