EAST BERLIN, SEPT. 20 -- The two Germanys today approved the 1,000-page treaty by which East Germany will voluntarily vanish from the map Oct. 3, discarding its constitution and adopting nearly all of West Germany's laws.

Less than a year after the mass demonstrations that brought down East Germany's communist regime, legislatures in East Berlin and Bonn each voted by more than the necessary two-thirds margin to end four decades of division.

For the East German People's Chamber, today's 299-to-80 vote -- with the former communists and leaders of the grass-roots groups that spearheaded last fall's revolution in opposition -- was the next to last act of a body elected for the purpose of dissolving the nation it serves.

On Oct. 2, the chamber will meet for the last time, to lower the East German flag. At the stroke of midnight, the red, black and gold banner of West Germany -- and of the reunified nation -- will be hoisted over the Brandenburg Gate, the enduring symbol of Berlin.

Several hours after the chamber acted today, the West German lower house voted 442 to 47 to ratify the treaty. The Bonn legislators then rose and sang the national anthem.

The two states merged their economies July 1, and last week the four victorious World War II powers gave final approval to a restoration of full sovereignty for a reunited Germany.

Speaking today for the Bonn government, Foreign Minister Hans-Dietrich Genscher, declared that the new Germany was no threat to its neighbors. "We do not seek more power," he said, "but we are certain of our greater responsibility."

East German Prime Minister Lothar de Maiziere thanked Soviet President Mikhail Gorbachev for making German unification possible.

When East Germany ceases to exist, its people will be governed almost entirely by West German law. In months of heated debate and negotiation between Bonn and the East Berlin government elected in March, the East Germans prevailed on few issues.

Under the treaty, East Germans will have to adapt to life without the broad array of social benefits that the communist government provided. Bonn did agree to allow East German women the right to abortions, which are largely illegal in the West, for a two-year interim period. The East also will retain its zero-tolerance drunk-driving law for at least two years. West Germans may drive with up to 0.08 percent of alcohol in their blood.

But nearly all other legal distinctions between the two countries will vanish. East Germany's police, military, courts, schools and government offices will be taken over by Bonn. From unions to workplaces, consumer laws to pension plans, nearly every aspect of life will now be governed as in West Germany.

East German legislators stood and cheered when the vote was announced, but the mood was not entirely celebratory. A group of activists from the grass-roots groups that organized the country's peaceful revolution burst into the session holding a banner reading "Hunger Strike."

Members of New Forum, the civil-rights alliance that sparked last fall's demonstrations, have occupied the former headquarters of the Stasi, the East German secret police, demanding that the 6 million documents detailing the activities of East German citizens be turned over to the people or destroyed.

The two German legislatures have agreed instead to consign the documents to an East German custodian. New Forum, fearful that the government will use the files selectively to punish its enemies, has rejected that compromise, charging that former Stasi officials are still in the East German leadership and may retain their posts in a united Germany.

Members of New Forum and the former communist party, now known as the Party for Democratic Socialism, voted against the unification treaty because they said it represented a capitulation to West Germany. Party chief Gregor Gysi called the treaty an "act of subjugation and annexation."

People's Chamber President Sabine Bergmann-Pohl, a member of Chancellor Helmut Kohl's Christian Democratic Party, agreed that the treaty with Bonn does not fulfill all of East Germans' desires but asserted that it is a good start, nonetheless.

The East German legislators suffered another indignity today when their meeting place, the Palace of the Republic, was shut down after revelations that the 14-year-old building, an $800-million showcase of the communist regime, was built with 720 tons of cancer-causing asbestos.

The chamber had to hunt around for an alternate venue and ended up in the House of Parliamentarians, formerly home of the communist party central committee, and before that of Nazi Germany's state bank.

Like many communist landmarks, the Palace of the Republic, which would cost $260 million to repair, faces an uncertain future. To West and East Germans alike, it is a symbol of the arrogance of the communist regime, which cleared prime downtown Berlin land for the gaudy building in 1950 by blowing up the treasured Prussian Royal Palace. East German police arrested anyone trying to photograph the demolition.