MOSCOW, SEPT. 26 -- The Soviet legislature today adopted a historic new measure that puts an end to the Bolshevik policy of atheist education and state control of religious institutions and permits organized religious instruction for the first time in the memory of most Soviet citizens.

The legislature, or Supreme Soviet, voted 341 to 1 with one abstention to adopt the new law, but it will continue debate on a number of particular issues covered by it, including the concept of religious education in public schools and religious services in Soviet military units.

After decades of official persecution, the practice of religion in the Soviet Union has been allowed far greater freedom in the past five years, a development that was illustrated perhaps most vividly last Sunday when Russian Orthodox Patriarch Alexei II celebrated the first full Mass in the Kremlin's Uspensky Cathedral since 1918.

Soviet President Mikhail Gorbachev, who was baptized into the Orthodox faith as a child, has met frequently with religious leaders since he assumed power in 1985 and had promised publicly to do away with harsh restrictions on religion.

Since the founding of the Soviet state by Lenin and the brutal dictatorship of Joseph Stalin that followed, the Kremlin has confiscated or destroyed thousands of churches and synagogues, executed or otherwise persecuted countless members of the clergy and infiltrated religious organizations with KGB agents.

The new law on "Freedom of Conscience and Religious Organizations" declares that all religions are equal under the law and bars the state henceforth from interfering in religious affairs.

Over the course of seven decades of Communist rule, the state outlawed most religious education and kept iron control over what little remained. The new measure forbids such interference and declares that religious institutions are free to set up classes, send students abroad for training and receive exchange students. It also allows religious groups to establish "societies, brotherhoods, associations" and other organizations for the public profession of their faiths.

Patriarch Alexei told the Soviet legislature today that the church is generally satisfied with the new law, but he added that he hopes state-run schools also would allow religious instruction. He was supported by Armenian legislator Genrikh Igitian, who said that traditional atheist instruction had worked to help "destroy" the country. "I believe every educated person should be instructed in religion," he said.

But another lawmaker, scientist Sergei Ryabachenko of the Ukraine, said that divisions between Russian Orthodox believers and Ukrainian Catholics -- who unlike Orthodox adherents acknowledge the authority of the pope -- are so heated that religious education in public schools in the Ukraine could turn the republic into "another Beirut."

"Given current conditions," he said, "we cannot allow our schools to be turned into scenes of battle between conflicting confessions."

The law maintains existing policy of exempting charitable donations from taxes and cuts the tax rate on profits of enterprises run by religious organizations from 69 percent to 35 percent. The most common enterprise is the publication of copies of the Bible and Koran.

Alexei also proposed establishment of an Orthodox Church publishing house to earn money to help restore the churches that were ruined or used as warehouses or factories under previous Soviet regimes.

Since Gorbachev came to power five years ago, many key religious centers, such as the Orthodox Pechorski Monastery in Kiev, have been returned to the religious organizations that founded them. The state also has allowed many more Soviet Moslems to make their required pilgrimages to Mecca and allowed importation and domestic publication of books sacred to various faiths. Jews have been allowed to emigrate in greater numbers than ever before, and a rabbinical school has opened in Moscow.

Christian and Islamic religious leaders now hold seats in the Soviet legislature, and even dissident Orthodox priest Gleb Yakunin, who had been jailed and exiled in the Brezhnev era, has won election to that body. Yakunin is also the leader of one of a number of Christian Democratic political parties.