NEW DELHI, NOV. 19 -- Tamil guerrillas today freed 18 Indian soldiers captured during last month's battle for control of Sri Lanka's Jaffna Peninsula, sending another reminder to India that it has been unable to accomplish what it sent the Army to do four months ago.

Instead of quickly subduing the rebels, India has become bogged down in what its leading news magazine this week called "the Lankan quagmire," with almost 30,000 troops in the island nation and casualties of more than 1,000.

Reports from the Sri Lankan capital, Colombo, said today that a cease-fire exists on the Jaffna Peninsula between the Tamil rebels and Indian troops. But, according to diplomats who have followed events closely, the guerrillas have shown no sign of giving up their demand to control the predominantly Tamil peninsula.

The Tamil Tigers, as the guerrillas are called, captured the Indian soldiers in several areas of Jaffna when Indian troops launched an offensive to enforce a July peace accord signed by Indian Prime Minister Rajiv Gandhi and Sri Lankan President Junius Jayewardene.

Although Gandhi has appealed to his countrymen to rally behind the flag and the Indian Army -- a potent symbol in this proud nation -- doubts are being expressed openly in New Delhi about India's new role as regional peacemaker.

"Indian soldiers already have paid a heavy price while battling the {Tamil rebels}, and now they face the unwelcome prospect of a long drawn-out guerrilla war that may extract a price out of proportion to possible diplomatic or military benefits," the news magazine India Today wrote in an editorial.

"Yet, an immediate pullout will damage the Army's morale. So should the country risk a Vietnam, or should Rajiv do what Henry Kissinger did in Paris: mask a withdrawal from battle with a fig-leaf accord? The choice is not an easy one."

For Gandhi, the prospect now is that he may find himself under fire for becoming involved in a conflict that could collapse a much-praised initiative.

Pictures of Indian soldiers lying dead on the unpaved back roads of the town of Jaffna, the provincial capital, already stare out from the pages of the country's major news magazine. It is a different image from that of confident troops being quickly airlifted to Sri Lanka four months ago.

Now, Indian generals must try not only to subdue a stubborn guerrilla force but to develop a civic-action program to win over civilians in areas taken from the Tamil Tigers.

By providing electricity and telephones, food and medicines, the Indians hope to win back the allegiance of a population torn between a desire for peace and loyalty to the rebels who many say stood up to protect them.

"The options at worst would be a classic insurgency situation. At best, the offer of joining the peace process is still open," said Lt. Gen. Depinder Singh, Indian commander for Sri Lanka, in a recent interview. He acknowledged that between 1,000 and 1,200 rebel fighters had slipped behind Indian lines as his troops advanced on the town of Jaffna.

Unless India's diplomats or helicopter gunships can find a new formula to neutralize the Tamil rebels, experts believe the guerrillas will be able to regroup. They could then mount the kind of guerrilla and terror campaign that could frustrate any plans to end the civil strife that has led to thousands of deaths in Sri Lanka since 1983.

This would turn what had been a civil conflict between Sri Lanka's predominantly Buddhist Sinhalese and predominantly Hindu Tamils into a complex, three-way affair with India in the middle.

In a recent interview in Colombo, Jayewardene gave the Indian forces high marks for their operations in Jaffna, but also hinted that all is not smooth between the Indian forces and the majority Sinhalese population.

"I am not a military man, but knowing the difficulty our forces had, they handled it well . . . . There are civilian casualties, but they are part of war. They have crushed {the Tigers}," the 81-year-old Sri Lankan leader said.

At the same time, Jayewardene criticized delays in stripping the Tigers of their arms, as called for under the July accord. In addition, he said, Indian Army actions in Trincomalee in the Eastern Province in the first two weeks of October created a backlash by the majority Sinhalese. The Indian forces are accused of standing aside while Tiger gunmen killed about 200 Sinhalese, and of attacking Sinhalese themselves, including Buddhist monks.

"Unfortunately . . . what happened in Trincomalee has colored the whole situation," said Jayewardene. It is what happens "when you have thousands of refugees all over the island and they blame the Indian troops and there is propaganda . . . This is the unpopularity of the steps that were taken, not the agreement itself, which was hailed by many once India took the place of our forces in the attempt to clean up Jaffna."

Jayewardene seems determined to press ahead with his end of the accord. Despite new terrorist bombings and unrest, he pushed a measure through Parliament last week changing the constitution to allow for regional councils, provided for under the accord, that would give Tamil-dominated regions a high degree of autonomy.

"My timetable is based on the accord -- provincial elections in December. I am keeping to our timetable on legislation. {But} I can't guarantee there will be elections in December," Jayewardene said. Reports from Colombo now suggest the elections are not likely to be held for several months because the government's requirements of peace and security have not been met.

Prospects for a political accord and some apparent differences over who is in charge in the Jaffna region were on the agenda when Gandhi and Jayewardene met early this month at a South Asian regional summit in Katmandu, Nepal, and later in a bilateral session in New Delhi.

When Indian officials began talking last month of sending civilian administrators to Sri Lanka to help rebuild Jaffna, Sri Lankan leaders reportedly were upset.

"The announcement was supposed to have been a mistake," Jayewardene said. "My whole administrative service in Jaffna is there, except for the police. There is no necessity for foreigners if we have our own people. Unless our people are frightened to do it, it is unnecessary."

But only a few days earlier, a top-level Indian official in Madras, in the predominantly Tamil southern Indian state closest to Sri Lanka, spoke in a different vein.

"We are moving into a critical phase now," the official said. "The next six weeks will be important. We have to set up a civilian infrastructure and have to get people in place to respond when a local committee or notable asks for help to repair electricity, or roads, or telephones, or whatever."

Whether the Jaffna Peninsula can be brought under Colombo's control and the allegiances of its people swayed remain the critical factors in this next phase.

With the area under a general curfew until the last few days, it has not been possible to gauge the mood of the people of the Jaffna region, although there is little doubt that it swung sharply toward the Tigers during the Indian advance on Jaffna.

Despite Indian claims that every effort was made to minimize civilian casualties, there were numerous reports of Indian gunships firing on civilians and of artillery or mortar fire causing property damage.

Now, there seems to be a swing in sympathy away from the Tamil Tigers. The Indians are hoping that the civic-action program and the removal of rebel weapons will lead to support for the Indians and for the accord.