COLOMBO, SRI LANKA, JULY 30 -- A peace-keeping force of 3,000 Indian troops spread out across the Jaffna Peninsula today to help enforce a controversial peace agreement intended to end Sri Lanka's ethnic civil war.

Amid indications that New Delhi's role in the affairs of its southern island neighbor will be extensive, an Indian official here said Indian Air Force planes were used today to help redeploy units of the Sri Lankan Army from the north of the country to the capital of Colombo to help the hard-pressed government of President Junius R. Jayewardene.

Jayewardene is trying to suppress popular discontent that has left more than 40 persons dead in two days of rioting.

Under the accord signed yesterday between Jayewardene and Indian Prime Minister Rajiv Gandhi, a cease-fire is to go into effect Friday between Sri Lankan government forces and Tamil guerrillas. Rebels are to surrender their arms by Monday. India can also send peace-keeping troops if so requested by Sri Lanka.

As Gandhi prepared to leave Colombo earlier today, he was struck by a rifle butt wielded by a member of the Sri Lankan Navy honor guard. The blow caught him on the back of the shoulder and head, causing bruises and abrasions but no serious injuries, he told reporters after returning to New Delhi.

According to photographs of the incident and eyewitness accounts, the man, identified as a 20-year-old resident of a Colombo suburb, picked up his rifle and struck the Indian prime minister with its heavy butt end. It was not immediately clear why Gandhi was attacked. The man was later arrested.

Gandhi, who has been the target of at least one assassination attempt in New Delhi in which he narrowly escaped, is known to wear a bulletproof vest in public. He is regularly surrounded by a special team of bodyguards, one of whom reportedly helped quickly subdue the attacker today.

The emerging presence of Indian forces and this morning's attack gave an increased air of urgency to a situation already highly charged by rapid political developments over the past several days.

In Washington, State Department spokesman Charles Redman said the United States is willing to provide Sri Lanka with logistical support to help implement the peace accord. "That certainly does not mean U.S. troops in any way," he said. "The information I have is that what we're dealing with here are logistical concerns, and that is essentially transport requirements." He declined to elaborate.

Indian Ambassador J.N. Dixit said he did not know how long the Indian troops will stay. He said more troops could be on the way. "We have come in. There are tasks to be fulfilled to the mutual satisfaction of both governments," he said.

The combination of events left the government of President Jayewardene in a precarious position, according to diplomatic observers who follow Sri Lankan affairs closely. Many of the majority Sinhalese population have taken to the streets to oppose the accord because they feel it gives too much to the country's Tamil minority.

So far, the main Tamil rebel group has refused to accept the terms of the peace accord.

Most Sinhalese are Buddhists while most Tamils are Hindus who have an affinity for the Tamils of southern India. Tamils think they are discriminated against by the Sinhalese, and since the 1980s, this sentiment has generated an active guerrilla movement seeking an independent homeland in the northern and eastern parts of the island.

A key element of the accord is the government's agreement to set up a single provincial council and government for the Northern and Eastern provinces, where most Tamils live.

Another critical factor in the fortunes of the government over the next two weeks, according to informed observers, will be the position taken by the Sri Lankan military.

One top cabinet member said today that there was concern about the loyalties of many in the lower ranks. The arrival of the Indian troops has not been universally welcomed within the Sri Lankan military, some of whom may feel insulted by the presence of a foreign army to help enforce the peace accord.

Sri Lankan Army troops, who have been hard pressed in fighting Tamil guerrillas in recent weeks in the northern Jaffna Peninsula, have been called into service in recent days to help police quell rioting.

In several cases, however, reporters have witnessed situations in which soldiers stood by as rioters burned government buildings, springing into action only when an officer appeared on the scene. In other instances, military personnel have appeared to be fraternizing with rioters.

"There is a real question in people's minds whether some unit will just put down its arms and join the crowds," said one veteran diplomatic observer.

While tensions remained high after two days of violent reaction to the peace accords in Colombo and elsewhere in the predominantly Sinhalese south and center of the country, there were fewer reports of demonstrations today.

A curfew that was supposed to be lifted at 11 a.m. following Gandhi's departure was extended until Friday.