Backed only by a pistol smuggled to him by his wife, the Venezuelan ambassador and four other hostages escaped today from their militant peasant-student captors by threatening them with a non-existent submachine gun.

Ambassador Santiago Ochoa and the four others, held since May 11 in the Venezuelan Embassay by the Popular Revolutionary Bloc, climbed to freedom through a black window of the one-story embassy.

Left behind were the smuggled pistol and two other Venezuelan diplomats and a Salvadoran employe.

Minutes after his escape, the visibly shaken ambassador told how the hostages kept the pistol hidden and shut themselves in a back room. Then, while military attached Col. Witemumdo Hernandez shouted to distract the militants, the ambassador, another diplomat and three Salvadoran secretaries went out the window.

Col. Hernandez and other two stayed behind, apparently to keep a Venezuelan presence in the building.

Ochoa said it was risky to confront the armed militants, but, "we had to take a chance."

No one was injured in the escape.

After the five hostages escaped, dozens of heavily armed police surrounded the embassy.

Meanwhile, negotiations for the release of hostages held by the same militant group at the French Embassy since May 4 had reached a tense stalemate. A May 4 takeover of the Costa Rican Embassy ended when the hostages escaped.

The Venezuelan ambassador told how he had tried to reach a peaceful settlement with his captors during the nine-day siege.The Venezuelan government is somewhat sympathetic to opponents of El Salvador's rightist military government.

But the building was sealed off from the beginning and the Bloc members were unable to communicate with their leaders. Tensions rose and at one point the Bloc members searched the embassy and demanded a key to the confidential files.

"They took the embassy apart," Ochoa said. "I decided they had humiliated us enough. Our country comes first."

It was then that Ochoa decided to ask his wife who had been bringing food to the hostages every day, to bring him a pistol.

The ambassador said the decision to escape was his alone and he had not consulted with his government. A special Venezuelan envoy sent here last Thursday to negotiate the hostages' release had returned home for talks earlier in the day.

Ochoa said he stood by his pledge made at the beginning of the takeover to ensure the safety of the militants. He asked for the Red Cross or the archbishop's offices to negotiate with those still in the embassy.

The Popular Revoluntionary Bloc has been demanding the release of three leaders whom it believes are in government custody. Both the French and Venezuelan governments have relayed the demand, but the Salvadoran government insists that it is not holding the three.

Opposition figures who have been seized under similar circumstances in the past have often been found dead or are never seen again.

San Salvador's archbishop, Oscar Romero, said at a mass this morning that the three leaders are "surely dead." He urged the Block to release all its hostages.

The mass was held in a local church since the Bloc also has occupied the city's cathedral since May 4, the same day the French and Costa Rican embassies were taken.

The Bloc originally had asked for the release of five members, including the organization's secretary general, that it said were arrested in late April. It also insisted that the French, and later the Venezuelans, pressure the Salvadoran government and inform the rest of the world of repressive political and social conditions here.

Following strong French pressure, the governor release two of the Bloc members, including Secretary General Facundo Guardado.

The French now reportedly maintain that they have met the Bloc demands to the greatest extent possible but the Block says it wants more concrete action.

In an interview yesterday, Gaurdado, 24, said the Block had asked for publication in French newspapers of a Block statement outlining what it says are abuses of power by the military government and social and economic problems the government has perpetuated.

Guardado also said the Block wants France, which is a member of the U.N. Security Council, to make a public denunciation of the Salvadoran government to that body, and to ask for an investigation by the U.S. Human Rights Commission.

He strongly denied government charges that the Block is allied to guerrilla terrorist organizations, but said that its long term goals include the establishment of a "popular revoluntionary government of peasants and workers."

That implies, Guardado said, "the destruction of the existing system and the bourgeois class." The Bloc's short-term goals he said, include "better salaries, improved health services and education."