Six Soviet Pentecostalists, who took refuge in the U.S. Embassy here nearly five years ago seeking help to leave the Soviet Union, left their sanctuary voluntarily tonight to return home to Siberia in the hope that they will be granted permission to emigrate.

The departure marks the end of an extraordinary diplomatic episode that was an embarrassment for the Soviet authorities as the group gained worldwide publicity. It also relieves the U.S. Embassy of a delicate problem. It had granted the Pentecostalists a refuge but not asylum and it was unable to obtain assurances from the Soviet authorities that they would be granted safe passage to the West.

For the Pentecostalists involved, their predicaments remain.

A spokesman for the group, Lyuba Vashchenko, 30, told journalists gathered inside the embassy compound that they were returning to their home town of Chernogorsk, in Siberia, where they would apply for exit visas to emigrate to Israel.

The decision to leave the embassy, she said, was taken by the group after her sister Lydia, 32, was allowed to emigrate to Israel last week. Lydia was the first of the original group of seven Pentecostalists to leave the embassy after a 34-day hunger strike. She returned to Chernogorsk in February 1982.

"Lydia's departure was a good sign for us, for our family. We plan to go to Lydia," Lyuba said clutching a guitar. "Our hope is God. He never left us and will never leave us."

Despite uncertainties about their future, the two families are expected to be granted exit visas eventually. There was speculation here that there is some sort of understanding between Moscow and Washington on this issue.

When they took refuge in the embassy, the Pentecostalists initially slept on benches in the consular section before they were moved to a one-room basement apartment. A year ago, the embassy shifted its barber shop to another room to provide the families with two rooms.

Unable to emigrate and afraid to leave the compound, they lived in a crowded place with the embassy courtyard the only outdoor space they could use.

"It's strange to imagine how I will walk along the street," said Lyuba Vashchenko, who now speaks fluent English.

The six, and four members of their families who were let into the embassy for the occasion, were taken in embassy vehicles to the airport to fly back to Siberia later tonight.

A number of U.S. diplomats escorted the group, including Marine Col. Paul Rousch, who was an assistant military attache here in June 1978 when the two families rushed past Soviet guards into the embassy compound complaining of religious persecution and asking American help in getting to the West.

Warren Zimmermann, deputy chief of mission, refused to comment on possible U.S.-Soviet talks about the group's fate. He said, "The decision to leave was their own."

Soviet guards made no attempt to stop or inspect the vehicles as they left the embassy. Nor were there any problems at the airport as the group departed on two separate flights holding tickets paid for by the embassy, according to U.S. officials.

It was expected that the Soviet authorities would allow the group to emigrate to Israel although there may be some legal complications. The group consists of the Vashchenko and Chmykalov families, both of Chernogorsk. The Vashchenkos have 13 children while the Chmykalovs have nine.

With Lydia Vashchenko already in Israel, her family could legally seek reunification under the agreement signed after the 1975 Conference on Security and Cooperation in Helsinki. The Chmykalovs do not have any relatives abroad.

During a brief meeting with journalists, the Pentecostalists hinted that their decision was a hard one.

"This is the biggest risk of our lives we are taking," said Avgustina Vashchenko, 54, who with her husband Pyotr, 55, and three of their daughters entered the embassy compound in 1978.

"It's a big risk," agreed Timofei Chmykalov, 20, holding yellow carnations. He and his mother, Maria, 60, were the only members of the Chmykalov family to rush into the embassy, leaving the rest of the family in Chernogorsk.

An embassy spokesman said Ambassador Arthur Hartman went to bid farewell to the families. "The ambassador told them their departure from the embassy would not change our strong desire to work for their emigration," the spokesman added.

The two families have been trying for the past 23 years to leave the Soviet Union for a western country where they could practice their evangelical faith in peace. Their religious practices ban sending children to state schools and Army service, both of which are required by Soviet law.

Members of the Pentecostalist faith are scattered across the Soviet Union with most of them in Siberia.

In the only official reference to the two families, the government news agency Tass said shortly after Lydia Vashchenko emigrated to Israel last week that the other six Pentecostalists should go home and make formal applications for exit visas if they wanted to leave the country.