The ambassadors of France and Costa Rica today remained hostages of a militant peasant group that has occupied their embassies since just after noon Friday, while their governments attempted to secure their release.

Although there reportedly were brief volleys of gunfire when each embassy was seized, the situation today developed into a peaceful but tense standoff.

Both ambassdors - Michel Dondenne of France and Julio Esquivel Valverde of Costa Rica - were apparently uninjured, as were members of their staff captured with them.

A member of the French Embassy staff outside the building said that a Salvadoran servant had been shot during the initial attack and was hospitalized in satisfactory condition.

Relatives and friends of the captured French personnel were allowed to send food and drinks to them this afternoon, hauled up through second-floor windows.

The wife of the embassy's first secretary Jean Duffaud, who was captured along with the ambassador, said her husband had told her "it is very peaceful inside," but her voice and hands trembled as she prepared to send food to the captives.

Fourteen men and two women of the Popular Revolutionary Bloc are inside the building, according to French Embassy officials. The officials also said the revolutionaries are armed. In addition to the ambassador and first secretary, the hostages are three office secretaries and one Salvadoran.

Members of the Revolutionary Bloc reached by telephone inside the building said they would continue to hold it until five recently arrested members of their party, including its secretary general, are released by the Salvandoran government.

First Secretary Duffaud told a reporter by telephone that everyone inside was "fine, if it is possible to say that . . . everything is being negotiated." He then hung up abruptly concluding "I can say no more."

An inspector of te Salvadoran police outside the Costa Rican Embassy said that there were no injuries indicated that as many as three of the attackers had been wounded.

Inside, according to the inspector, are the ambassador, the secretary and two servants. The inspector said the attackers are believed to be armed with automatic weapons.

[Salvadoran police said terrorists killed one police officer and wounded another Saturday in San Salvador, Associated Press reported. No group claimed responsibility for the attack and it awas not known if it was connected to the seiges on the embassies. Two police officers also were killed Friday, but members of the Revolutionary Bloc said their group was not involved.]

Spokesman for the Revolutionary Bloc inside the French Embassy said their action was intended as a peaceful demonstration, but they would hold the ambassadors until their demands are met. The samd group also seized the city's cathedral late Friday afternoon without incident but against the protest of Catholic priests.

At lunch hour today they were broadcasting their call for the release of the government's prisoners over the cathedral's loudspeaker system.

A young man took a collection from passers-by as he stood on the steps of the cathedral behind its iron gate. Three or four more young men could be seen standing unarmed in the doorway. No police were in evidence and the takeover of the cathedral was thought to be a kind of symbolic act that has become commonplace in this country.

The Revolutionary Bloc is the most militant of at least three peasant organizations that have been banned by El Salvador's military government.

The government has charged that the organizations work in concert with three separate Marxist guerrilla groups. Both the government and the small, wealthy elite that owns most of El Salvador's land fear the peasants' demands for land reform and widespread political changes in this near-feudal country.

At least 28 people were killed in March last year in a confrontation between the Revolutionary Bloc and government security forces in the small town of San Pedro Perulapan in central El Salvador. While the military alleged that the peasants had provoked the incident, the Bloc, later backed by an investigation conducted by the office of San Salvador's archbishop, charged the government with causing the confrontations and with conducting a widespread search and seizure. The peasants also said the government was responsible for most of the deaths.

While El Salvador's guerrillas have terrorized the country's foreign and local business communities through kidnappings, demands for high ranson, and occasional murder, the occupation of foreign embassies and offices of international organizations here has largely been a tactic of the peasant groups.

Last January, a similar peasant organization took over the Mexian Embassy and the local headquarters of the Organization of American States. Although their demands for the release of prisoners were unmet, they left peacefully after several days.