A U.S. brokered breakthrough that could end the six-week border war between India and Pakistan has put the governments of both countries in an awkward position at home, raising fears it could still fall apart under domestic political pressure.

Nawaz Sharif, the Pakistani prime minister, who met with President Clinton in Washington on Sunday, essentially has agreed to withdraw Pakistan's support for armed rebels who have occupied strategic heights in the Indian part of Kashmir since April. But any move to do so is likely to be strongly opposed inside Pakistan by large segments of the armed forces and by fundamentalist Islamic groups.

"There is going to be tremendous pressure inside Pakistan now. Either Nawaz [Sharif] will have to go or the army chief of staff will have to go," said one Pakistani source close to a major fundamentalist Islamic group, speaking from Islamabad. Other sources there said tonight that protests and strikes are being planned for Sharif's return this week.

For his part, Atal Bihari Vajpayee, the Indian prime minister, who has repeatedly vowed never to accept "third-party mediation" in India's long-running dispute with Pakistan over who should control Kashmir, has now done just that. Although India is the obvious beneficiary of the agreement signed by Clinton and Sharif, Indian officials insisted the high-profile White House role in trying to end the war was not foreign mediation at all.

"I do not accept this as mediation or even as playing the role of an intermediary," Jaswant Singh, India's foreign minister, said tonight. "We have consistently said no mediation is necessary. We don't need interpreters, because we speak the same language."

The unexpected joint statement from Clinton and Sharif effectively said Pakistan will respect the Line of Control dividing the Indian part of Kashmir from the part controlled by Pakistan. This would seem to represent an Indian victory, since it corresponds to Indian demands. But instead of exulting, officials here warned sternly that they will not let up on their assault on rebel positions until the fighters are dead or have fled Indian territory.

"Our military actions are making steady progress, and we will continue in full force until the aggressors are cleared out," said Raminder Jassal, the spokesman for India's Ministry of External Affairs. So far, he added, there is "no evidence on the ground that Pakistan is taking steps to withdraw . . . we will only go by the evidence on the ground."

In addition, both major political parties in India sought to play down the significance of the Washington agreement. A spokesman for the ruling Bharatiya Janata Party said Pakistan only "succeeded in internationalizing its own position as an aggressor. . . . This statement is not enough. One still has to wait and see."

For India, the sudden involvement of Washington in the Kashmir dispute is a double-edged sword. If it leads to Pakistan's pulling back the armed Islamic militants and army troops occupying strategic ridges inside Indian Kashmir, it will achieve India's immediate goal without further bloodshed. Already, 265 Indian troops have been killed and 451 wounded, along with what India claims are 486 Pakistani troops.

On the other hand, Clinton's meeting and agreement with Sharif would seem to have "internationalized" the Kashmir issue, which is precisely what Pakistan has long sought and India has desperately wanted to avoid.

India insists that the southern part of Kashmir is rightfully India's and should remain that way. Pakistan contends it was stolen from Pakistan in an unfair 1947 treaty, concluded as the two nations gained independence from the British Raj, and that foreign mediation is needed to settle the issue.

For Pakistan, the stakes are far more delicate and volatile. By seeking Clinton's support, analysts said, Sharif has enlisted an ally in opposing the powerful Pakistani army, which views the Kashmir cause as a sacred patriotic issue. Yet by apparently agreeing with Washington to back off, the prime minister has automatically engendered the wrath of military and Islamic groups at home, which have threatened to bring him down if he betrays their cause.

"Clinton has got Nawaz in a jam. He has committed a crime against the nation and everyone is condemning him," said Hamid Gul, a retired Pakistani general, hard-line Muslim and former intelligence chief, speaking from Rawalpindi, Pakistan. "People are getting more and more angry, and soon it will be Nawaz on one side and the nation on the other."

In Lahore, Pakistan, a leader of the major Islamic militant group now fighting in Indian Kashmir said today that the military situation is under the "complete control" of the rebels and that India will ultimately suffer a "humiliating defeat." India says it has made significant military strides in the past two weeks, culminating over the weekend in the recapturing of a strategic Kashmiri peak known as Tiger Hill.

CAPTION: Supporters of the Pakistan Islamic Party protest Pakistani Prime Minister Nawaz Sharif's agreement to withdraw support for guerrillas fighting in Indian-held Kashmir.