INHAMBANE, Mozambique (AP) _ Rebels who attacked a small town indiscriminately killed bedridden hospital patients, women and children and kidnapped youngsters to carry away their plunder, the government said Friday.

The national news agency AIM said 386 villagers were massacred in last Saturday's raid on Homoine by guerrillas who gunned, clubbed and bayoneted their victims.

''About 5:30 in the morning the armed bandits appeared,'' said Nizar Moussa, who was shot in the chest. ''They began to spread out throughout the town. They tried to attack the police headquarters. They did not succeed so they went to the hospital. They went house to house massacring people.''

The Marxist government blamed rebels of the National Resistance, or RENAMO, for the killings in the agricultural community 300 miles north of the capital, Maputo, and 18 miles inland from this coastal town.

The guerrilla movement, which has been fighting for 10 years to topple the government, denied involvement. In a statement released Friday in Lisbon, Portugal, the rebels blamed the killings on local militiamen fighting in a mutiny against government soldiers.

Moussa, however, said Thursday that about 80 local militiamen fired at the attackers from trenches in the town but were outnumbered.

The government said 76 people were wounded in the attack. Many of them, including children with their heads, eyes or arms bandaged, were being treated at the Inhambane hospital.

Celeste Severian, 30, sat up in bed to talk, wincing in pain from a leg wound. She said her 6-month-old daughter was killed.

Ms. Severian said the attackers chanted, ''We want to finish off the people of President Samora Machel,'' Mozambique's first president following independence from Portugal in 1975. He died Oct. 19 in a plane crash inside South Africa, and his foreign minister, Joaquim Chissano, became president.

Prime Minister Mario Machungo traveled by helicopter, ferry and an army- protected car convoy Thursday to reach Homoine.

''Some of the people who managed to escape told us that they killed pregnant women with bayonets. They shot such people in the hospital beds,'' he told a dockside news conference in Inhambane after returning.

Machungo said he was told by residents that the attackers had kidnapped young children, forcing them to carry looted clothing and food AIM said was worth about $125,000.

In Washington, the U.S. State Department said it had learned from reliable witness reports that the loss of life was heavy, though it could not confirm the Mozambique government's figures.

Nancy Beck, a department press officer, said Friday that the U.S. Embassy has sought permission from the government to visit the site as soon as possible.

''We are shocked by the brutal mass killing of innocent persons and we extend our condolences to their families and to the government of Mozambique,'' she said.

AIM said the dead included ''three teachers from the local primary school, a nurse, and a hospital auxiliary worker and his young son.

''A crippled shoemaker called Filipe was murdered, as was a local tailor, Chamussedine Adamo Chafy. Even four mentally ill old people, who spent most of their time at the town's bus stop, were killed,'' it added.

''Twenty-year-old Carolos Rafael Vuma, who suffered from leprosy, but gained considerable fame locally when he won the national lottery, was also among the victims,'' AIM said.

The news agency obtained pictures Friday and published an interview with photographer Jorge Tome of the weekly magazine, ''Tempo.''

One picture, of what Tome said was a mass grave in Homoine, shows a line of nine bodies next to a ditch.

''Unidentified corpses were being buried in a mass grave, which I photographed. Inside there were some 15 to 20 bodies,'' he said.

Another picture shows a line of wrapped bodies on the covered verandah of Homoine Hospital, where AIM said 80 people were killed.

Tome said he was in Inhambane when he heard about the attack Saturday night. He said he arrived Monday morning and most of the dead were buried Monday and Tuesday.

On Thursday night, Machungo condemned moves by U.S. Sens. Robert Dole of Kansas and Jesse Helms of North Carolina, both Republicans, to encourage talks with the guerrillas and consider possible American aid to them.

''If you are able to kill a pregnant woman in a hospital bed, you are backing these people,'' Machungo said. ''When the baby is taking milk from the mother, they kill both. You back these people.''

The South African government denied Mozambique's accusation that Pretoria recently parachuted new weapons to the guerrillas and was directly responsible for the killings.

South Africa says it stopped aiding the rebels when it signed a 1984 peace accord with Mozambique. Mozambique contends that the aid continues.