COLOMBO, SRI LANKA -- Indian Prime Minister Rajiv Gandhi and Sri Lankan President Junius R. Jayewardene are waiting to see if a political gamble they took last week will bring peace to this West Virginia-sized nation or drag it, and themselves, down.

With one stroke, they achieved a break in the confrontation that has left an estimated 6,000 Sri Lankans dead since 1983 and has spread across the narrow straits that separate this country from India.

"Their chances right now are maybe slightly better than 50-50," said a seasoned diplomatic observer. The events that bracketed Wednesday's signing of an accord between Sri Lanka and India underscore this assessment.

Jayewardene, 80, has seen the 16 million Sri Lankans and his government splintered, with some voices crying for peace and others, feeling their heritage has been betrayed, for vengeance. At least 50 died in two days of rioting at midweek and virtually the entire country is under Army-enforced curfew and censorship.

Gandhi, 42, responded to a request by Jayewardene to send Indian Army troops to northern Sri Lanka to help enforce a cease-fire and disarm Tamil guerrillas. More than 3,000 have landed out of a force that reportedly could reach 9,000. It is a move that in the short run enhances India's position as the dominant power in the region and also helps Gandhi's faltering political standing.

In the long run, however, it may make the young prime minister hostage to events in Sri Lanka. If events outlined in Wednesday's accord do not develop smoothly, Gandhi could find those same troops involved in a bloody guerrilla conflict against the Hindu Tamils of the Jaffna Peninsula.

"He may well have bought himself another Punjab," said one diplomat, referring to the accord reached with Sikhs in Punjab that later fell apart. "All the problems are still there and many of the basic issues are not yet addressed. More important, basic people are not included."

Under the accord, Sri Lanka pledges to pull its troops back from positions gained in fighting with Tamil guerrillas in recent weeks and to create a single provincial government for the two areas of the country where the Tamils are concentrated. Overall, the Tamils are 18 percent of the Sri Lanka population.

The Tamil guerrillas, in turn, are to lay down their arms and give up their struggle for an independent homeland.

India in the past has supported the Tamils, sometimes openly but never officially. By signing the agreement, India became the guarantor for both sides. To the Tamils, once disarmed, it is a safeguard against any wrongdoing by the predominantly Buddhist Sinhalese government. To the Sinhalese, New Delhi is the agent to deliver the Tamils and their guns.

India and Sri Lanka had come close to agreements before, only to see them collapse. While New Delhi usually pointed a finger at Jayewardene, accusing him of backtracking, India did not deliver the Tamil guerrillas.

With each failure, the Sri Lankan government would put more emphasis on a military response, stripping its economy to build a more credible fighting force out of the ceremonial Army it possessed when the struggle began.

By the end of last year, things had come to a head, according to one diplomatic observer, and Colombo moved more forcefully toward military options.

After imposing an economic blockade on the guerrilla heartland in the Jaffna Peninsula, its forces moved out of fixed positions and began attacking.

"The Indians kept telling us, 'Don't take Jaffna,' " National Security Minister Lalith Athulathmudali said in a recent interview, referring to the peninsula's heavily populated administrative center. So, he ordered his troops instead to take the Vadamarachchi area in the northeastern corner of the peninsula, the home town of most of the guerrilla leadership and a major staging area.

For the first time, Sri Lankan officers scented victory, although they admitted after the accord Thursday that it would have been a difficult fight.

With the Army poised to move, India actively intervened for the first time. Under the guise of offering humanitarian assistance to the Tamils of Sri Lanka, in June it sent boatloads of food across the narrow Palk Strait. When the tiny Sri Lankan Navy turned back the Indian boats, Gandhi ordered an air drop, with transports covered by Mirage fighters.

"Jayewardene seemed genuinely shocked by the Indian action," realizing how vulnerable he was, said a diplomat.

"It was a situation where both sides faced major decisions. The government either had to talk or move to a military crunch. The Indians, once they had committed themselves, faced the same problem," said a western analyst.

Unexpectedly, the upshot of the air drop and a subsequent agreement to allow Indian boats to land with supplies, to be distributed by Indian Red Cross personnel, was to undermine the Tamil guerrillas, according to an Indian analyst.

"The Sri Lankan Army had come into their home villages and the people saw the guerrillas couldn't protect them, even though they may have been withdrawing out of standard guerrilla tactics. For the people who saw neighbors and relatives killed while the militants ran, it made no difference," he observed.

"Then they saw our people coming in to distribute food," once again making the erstwhile protectors look impotent, said the Indian.

Indian diplomats here, political leaders in Colombo, New Delhi and the Indian coastal city of Madras and, ultimately, Gandhi and Jayewardene seized the moment to act. Indian diplomats also credit the United States with timely intervention to urge the Sri Lankans to agree to take the diplomatic route.

Jayewardene, who still must force legislation through Parliament to carry out his end of the accord, promptly faced a revolt in his government and in the streets.

"Jayewardene the dictator is going against our whole country," said Sinhala Balamanda Laya, a Buddhist monk, in a demonstration against the accord on Thursday. "We can't trust Gandhi. This is not Jayewardene's land to give away."

That view is shared by many Sinhalese, reflecting their distrust of giant India. Jayewardene's own prime minister, R. Premadasa, has refused to go along with the agreement and Minister Athulathmudali has been lukewarm publicly, but there is reason to believe his is a tactical posture, designed to increase his effectiveness in supporting the accord once signs of progress are clear.

Hundreds of buses, government vehicles and buildings have been burned in mob violence that has left parts of Colombo looking like battle zones. The government's hold in the southern part of the country seems tenuous.

Other Sri Lankans see the accord as the only way to peace. "They are crazy, these people rioting," said a middle-class Sinhalese office worker. "What does it matter, a little land? At least our boys won't be killed. There will be peace."

On the Jaffna Peninsula, there are similar voices of moderation heard, if with greater skepticism. "Up to a month ago, the average Tamil man's goal was to live another day. Now, that is assured. Beyond that, we will see," said a Tamil professional there.