Medieval monarchs who messed up repaired to Rome, hoping for papal absolution or at least a better press. Today's troubled leaders often repair to Washington.

That's how it happened that while his countrymen were at the beach and the barbecue, Bill Clinton spent the Fourth of July in urgent dialogue with the prime minister of Pakistan, Nawaz Sharif--a man in need of a friend. The subject was Kashmir, the lovely, disputed land that lies between India and Pakistan. Sharif had the difficult job of persuading Clinton that the Pakistani forces that had crossed the Line of Control in Kashmir were Islamic rebels not under his control--but that he could nevertheless promise they would pull back.

Sharif had asked for an emergency meeting knowing well that an American president could hardly condone aggression on Independence Day. But China, Pakistan's closest ally, had turned down Sharif's request for support during a trip he made to Beijing earlier this month, and he needed something to show his fanatics. He got two things: a pledge of Bill Clinton's "personal attention" to the Kashmir problem and an excuse for retreat.

Clinton's offer of personal attention, which fell far short of the internationalization of the problem that Pakistan has always sought and that India adamantly rejects, was not hard to get. Both India and Pakistan have the nuclear bomb, and something more than the fate of some of the world's most gorgeous mountain scenery is at stake.

Sharif also had the alibi of a certain coercion to take home. Pakistan has a pending $275 million development loan from the International Monetary Fund. The IMF has been known to cancel deals with misbehaving countries, and while we don't know if the matter came up during Sharif's three hours of conversation with Clinton at Blair House, the threat was there. The House International Relations Committee recently passed a resolution urging the president, in effect, to oppose the loan as a way of pressuring the Pakistanis to pull back. The president may have merely pointed out to his guest that the international community has taken India's side in the present crisis.

The following morning, before Clinton left for his four-day U.S. poverty tour, he received Sharif, with his wife and son, at the White House. Sharif flew on to London, where Tony Blair, Clinton's faithful ally, told Sharif that he was in complete accord with the Fourth of July agreement and intended to adhere to "the Clinton sequence"--withdraw first, talk about Kashmir later.

India, which has often felt misunderstood in Washington, is pleased with Clinton's diplomacy. The president kept India's prime minister, Atal Bihari Vajpayee, fully informed of the progress of the talks. And the agreement had no mention of the plebiscite the Pakistanis have demanded for the 50 years the dispute has lasted, nor of the mediation India fiercely rejects. The Indians say they held the U.N.-mandated referendum in 1987. The Pakistanis say it was rigged--and so do some Indians.

Back home in Islamabad, Prime Minister Sharif is having all the trouble he anticipated in selling retreat to Pakistani militants and their friends in the military, who are a dominating force in the country.

In Washington, Pakistan's ambassador, Riaz Khokhar, concedes the political necessity of the withdrawal, but says it will do nothing to cure the "disease" of the Kashmir problem, over which India and Pakistan have fought two wars. For now, he thinks the prime minister should tell the militant warriors, "You've won, you've whipped the Indians, you have internationalized the problem, you have made your point."

In February, some hope for a resolution of the seemingly intractable problem arose. In a move that was both imaginative and practical, the governments of both countries instituted a bus service between New Delhi and Lahore. The Indian prime minister boarded the bus at the Indian border; the Pakistani prime minister greeted him warmly in Lahore. They talked about talking about all their disputes and differences. They would discuss Kashmir, they promised, without conditions.

But no progress was made. Bilateralism failed. The continuing clash on the Kashmiri heights has ended hopes that the two adversaries can make peace between themselves.

Sharif's holiday pilgrimage, in the end, could be the beginning of outside intervention. If India and Pakistan can't stop fighting, the rest of the world may feel it must step in for the sake of humanity.