Pages of prayers had been chanted and most of the pews of the share Tefila synagogue has filled yesterday when Horace Gold rose from his seat among the congregation, pulled his white prayer shawl tighter around his shoulders and stepped to the pulpit.

"I'm grateful to be able to say hello to you, my friends," said the 60-year-old Gold. He had come back to his Silver Spring home at 5 a.m. the day before, after two days of lying on the concrete floor of the B'nai B'rith headquarters at 17th Street and Rhode Island Avenue NW, a hostage of Haneti Muslim gunmen.

"The Lord knows what to do. He knows how to do it and He knows when to do it," Gold said.

Thus, like Gold, did Jews here react to the peaceful end of the 39-hour siege that confined many of them as hostage: they turned to their religion for understanding and reassurance and they thanked God that they had come trough yet another trial.

Oppression has been so common in the history of Jews that be tradition a prayer has developed to be offered at the end of captivity. Gold and other hostages stood before their congregations Friday night or Saturday and offered the "birkat hagomel" the prayer of thanksgiving and hope.

"Baruch Atah Adonai," Gold began chanting in Hebrew, intoning the prayer which means, "We think you, of Lord our God of the universe, for having saved us and delivered us from captivity."

In synagogues around Washington, congregations responded: "May He who saved you from this, may He continue to watch over you."

The liturgy Friday night at Temple Sinai in northwest Washington had a sharper meaning members of the congregation.

"When will redemption come?" Rabbi Eugene Lipman prayed. "When we master the violence that fills our world," the people responded.

""When we look upon others as we would have them look upon us," the rabbi continued.

"When we grant to every person the rights we claim for ourselves," the congregation said. "We sing the song that celebrates our deliverance from Egypt and all bondage."

"Jewish tradition provides for all contingencies," the rabbi said.

"The "brikat hagomel" prayer was appropriate, he said, not only for the were hostages but "because our congregation is larger than its members.

"Also, I don't know how yoy felt this week," he said, "but I did not feel liberated. It has been a week of bondage for us all."

One man who walked forward in Temple Sinai to recite the traditional prayer was greeted affectionately afterward by several friends.

For him, captivity was not a new experience. He spent seven and a half months incarcerated in the Nazi's Buchenwald priso

"If my belief in God had decrease in any fashion," an acquaintance of the hostage said later, "this had brought me back to the faith. All I could think when I was watching television at 2:15 a.m. Friday was, "Thank God, thank God,' I have the same kind of feeling that I had at the end of the war."

At Shaare Tefile, Yette Greenberg, who with 11 other people had been barricated on a lower floor of the B'nai B'rith, hiding from the gunmen until she was rescued by police Wednesday night, said, "I think this will bring me back to Sabbath services.

"I don't go as oftern as I should," she added," "I was brought up in a very religious family but up in a very religious family but I dropped away a little. This will bring me back."

And at Ohr Kodesh Congregation in Silver Spring Rabbi Tzvi Porath chose for Friday night prayers Psalm 30, which declares, "My mourning was turned into joy."

Coincidentally, Jews only two weeks ago celebrated Purim, the festival that recalls how Queen Esther sucessfully persuaded Haman not to kill the Jews he sought to destroy. The current Hebrew month is Adar, which focuses on hope that any evil intentions will be thwarted.

This coincidence drew comment from some worshipers.

I was struck that the way this thing ended Friday was by an appeal to the Hanafi's fundamental religious beliefs," said Dr. William H. Goldwater of Temple Sinai.

But mixed feelings were expressed by some over the involvement of the three Moslem ambassadors in the negotiations to release the hostages.

"Thursday found them interving for the lives of countless Jews," Rabbi Martin S. Halpern of Shaare Tefila Congregation in Silver Spring said yesterday. "In the past they have turned a deaf ear to terrorism and numerous times welcomed terrorists within their own borders."

But in formal messages, the Jewish Community Council of Greater Washington praised D.C. officials for their efficient, capable and effective handling of the hostage events" and praised the ambassadors of Pakistan, Egypt and Iran for the 'sense of common concern which you exhibited at this difficult and dangerous time."