Revolutionaries holding hostages in the French and Costa Rican embassies here released the Costa Rican ambassador and four others, officials said.

Foreign Minister Jose Antonio Rodriquez Torth said Ambassador Julio Esquivel Valverde, who had been held captive since Friday with two secretaries and two servants, had been freed. He did not indicate whether the rebels' demands were met.

Diplomatic sources said a break-through in talks to free the Costa Ricans came about 6 p.m. Two planes reportedly flew the ambassador and his staff to San Jose, the Costa Rican capital, three hours later.

The hostages at the French Embassy were still being held as of late tonight.

Earlier today, fifteen labor unions shut down factories for more than two hours in a demonstration of growing sympathy with the rebel group. There were persistent rumors that a general strike would be called.

The government of Costa Rica and France sent special envoys to negotiate with members of the Popular Revolutionary Bloc for the release of the hostages.

Representatives of the group have said they are ready to talk. They are demanding release of five political prisoners, including leaders of their party, who they claim have been tortured by the Salvadoran police. They are also demanding, in more general terms, an end to "oppression" by the military government.

El Salvador's president, Gen. Carlos Humberto Romero, announced yesterday he would not negotiate with "subversives" but might deal through "honorable" intermediaries. He also said government security forces will not interfere.

The U.S. Embassy, meanwhile, has been or alert since Friday. Its 13-member Marine guard was briefly deployed behind it gates in complete battle dress this morning as a result of information from a Salvadoran military official that efforts may be mounted to size more embassies.

Although the mood in the capital generally has been calm, security precautions around the two captured embassies were increased today. Reporters, who had previously been allowed to approach the buildings, were forbidden access and were prohibited from taking pictures.

Earlier Costa Rican Ambassador Esquivel spoke to reporters from behind one of his embassy's bullet-shattered windows. He said everyone had been "doing well since the takeover-well," but noted that electrictiy, water and telephone communications were cut off.

At the French Embassy yesterday evening, relatives of the captives continued to bring them fresh clothes, food and drinks.Ambassador Michel Dondenne could be seen at a second floor windows wearing a suit and tie. With him are First Secretary Jean Duffaud, three office workers and a servant, held by as many as 16 revolutionaries, including two women.

The members of the group inside the embassies, a few of whom have been glimpsed through windows, appear to be young people, possibly in their teens or early twenties. One of them told a reporter that he is 14. Others from the organization are occupying the city's main cathedral without hostages. CAPTION: Picture, Salvadoran national policeman guards French Embassy where hostages are held.