TALLINN, Estonia - Jewish leaders and politicians from Estonia and Israel celebrated the opening of the Baltic country's only synagogue yesterday, six decades after previous houses of worship were destroyed in World War II.

Estonian President Toomas Hendrik Ilves and Israeli Vice Premier Shimon Peres cut the red ribbon at the front of the $2 million, 180-seat ultramodern synagogue in Tallinn after the Torah scrolls were brought inside amid music and dancing.

"You can burn down a building," Peres said, "but you cannot burn down a prayer. And we are a praying people."

Tallinn's previous synagogue, built in 1883, was destroyed in 1944 in air raids as Nazi troops fled the Red Army's advance. Tartu, a university town southeast of the capital, also had a synagogue, but it too was destroyed during the war.

About 5,000 Jews lived in Estonia before World War II, enjoying cultural autonomy declared by the government in 1926. The Soviet occupation of Estonia in 1940 ended that autonomy, and hundreds of Jews were deported, as were thousands of other Estonians.

When the Nazis invaded in 1941, a majority in the Jewish community managed to escape to the Soviet Union, but the roughly 1,000 Jews who remained were sent to concentration camps around Estonia.

They were later killed with thousands of other Jews deported to Estonia from other European countries. Experts believe fewer than a dozen Jews survived the Holocaust in Estonia.

Today, most of Estonia's 3,000-member Jewish community lives in Tallinn. The country has 1.3 million people in all.

Roughly 500 people attended yesterday's ceremony, including members of Israel's parliament and the chief rabbi of Israel, Yona Metzger.

Construction of the airy synagogue started in 2005. The price tag was shouldered by U.S.-based Rohr Family Foundation and Estonian donors.

In addition to religious services, the synagogue will prepare and distribute kosher foods at a restaurant and present the history of Jews in Estonia.

Estonia's chief rabbi, Shmuel Kot, expressed hope that the synagogue would strengthen the local Jewish identity.

"For a long time, it was not possible to practice Jewish life in Estonia," he said Tuesday. ". . . People will now have the possibility to feel as a Jew."