BERLIN, OCT. 3 (WEDNESDAY) -- At the stroke of midnight, a massive German flag -- now the only German flag -- rose where the Berlin Wall stood only months ago.

In a moment no one dared to imagine a year ago, East Germany ceased to exist and one of the most elusive and powerful goals of modern times, the quest for German unity, stood fulfilled as the West German black, red and gold banner was hoisted in front of the 96-year-old Reichstag building.

The emotional moment, cheered by a roaring crowd that spread throughout this long-divided city carrying torches and flags, capped a day of ceremony and transition. It was the birth of a new Germany, a nation that ended its 45-year probation with speed and smoothness of historic proportions.

Looking out onto a sea of people, West German President Richard von Weizsaecker pronounced the two Germanys one: "In free self-determination, we have completed the unity and freedom of Germany. We want to serve world peace in a united Germany."

The crowd sang the national anthem, and then the night sky erupted in a 35-minute display of fireworks.

"We are one people, we become one state," said East German Prime Minister Lothar de Maiziere in a television address to both Germanys. "It is an hour of great joy. It is the end of some illusions. It is a farewell without tears."

In his TV speech, West German Chancellor Helmut Kohl called the end of the postwar division "one of the happiest moments of my life."

In dozens of cities in both Germanys, fireworks burst overhead while crowds of thousands toasted the birth of Europe's most populous and prosperous nation. On the streets of cities and villages, strangers hugged, champagne corks popped and, for a few hours at least, the distance that developed between the two Germanys over four decades of enforced separation seemed to narrow.

But, while East and West Germans drank together, the tension between them remained. "It sort of feels like when you get married first and only then get to know each other," said Egon Bahr, a longtime leader of Bonn's Social Democratic Party. "We must now tear down the wall in our minds."

Earlier, the East German parliament, elected in March, dismissed itself. The four Allied powers -- Britain, France, the United States and the Soviet Union -- gave up their remaining rights as World War II victors over Nazi Germany.

The East German National People's Army dissolved itself in a 12-minute ceremony that the country's defense minister didn't even bother to attend. Of the 90,000 soldiers still in the once-proud army, 50,000 will now join the all-German Bundeswehr.

One year ago, East Germany was a Stalinist state steadfast in its resistance to the liberalizing influence of Mikhail Gorbachev's Soviet Union. But the collapse of Soviet control over Eastern Europe spread quickly to Moscow's most prized ally and East Germans began the mass flight and stirring street demonstrations that within weeks brought down the Communist government and the wall between the Germanys.

Last November, the chants of East Germans demonstrating against their government changed from "We are the people" to "We are one people" -- a shift that propelled the two countries to a unification that Kohl first thought would take five to 10 years.

The creation of the new Germany will be a trying process, the awkward marriage of a rich nation with a poor one, a powerful Mercedes with a sputtering Trabant.

Kohl, who mentioned East Germany only once during his televised address, urged his countrymen to stick together in the difficult times to come. "We will be able to solve the economic problems," he said. "Not overnight, true, but within the foreseeable future."

Nearly a third of East German workers have already lost their jobs as the communist economy collapses under competitive pressure from the Western market economy.

The joy on the streets was noticeably greater in the East than in the West, a reflection of the deep doubts many West Germans have expressed about the soaring cost of unification and the enormous gratitude of East Germans suddenly given the Western system they had long admired on television.

A new poll by the Allensbach Institute found that 61 percent of East Germans view unity as a cause for joy, a sentiment shared by 51 percent of West Germans.

In Munich, emotions were subdued Tuesday night and the city decided to close its annual Oktoberfest beer bash at the usual 10:30 p.m. last call. The city will confine its official observance of unification to a ceremony today featuring a speech by the mayor and a concert by a youth band.

Unification "is nice, but I'm worried about the coming problems," said Siegfried Schaller, a Munich retiree. "We promised the East Germans too much too soon. They want now what we've worked 40 years for."

Berlin was virtually paralyzed by the festive events as midnight approached. Hundreds of thousands of Germans poured into the city, eager to tell their children that they stood at the Reichstag or the Brandenburg Gate as their country became one again.

Tens of thousands of Poles also thronged to Berlin on Tuesday, buying up television sets and other Western goods on the last day before Germany imposes a visa requirement on Polish visitors.

Tonight, around the city, an army of 7,000 policemen separated leftist and rightist extremists, who came to blows sporadically but caused only a few injuries, police said. Celebrations around the country mostly came off peacefully.

West Berlin Mayor Walter Momper denied that any special measures were being taken, but the Bonn government, nervous about threatened disruptions by both left-wing anarchists and right-wing neo-fascists, sent thousands of police and border guards to Berlin.

Highways leading to the city were lined with police buses, water cannon trucks and armored personnel carriers. Fear of large-scale riots led the two Berlin police departments to unify two days early.

"Shut your mouth, Germany, that's enough," said posters advertising counter-demonstrations in Berlin.

In the East German city of Magdeburg, a group of about 100 skinheads attacked customers at a youth club, smashing windows and cars along nearby streets.

East German police officers patrolled street parties in improvised uniforms -- a West Berlin cap and an East Berlin jacket; Western tie and Eastern shoes. Many East German police, eager to overcome their repressive reputation, wore buttons that said, "Hello, you can talk to me!"

The official celebrations were considerably more low-key than originally planned. After Presidents Bush and Gorbachev declined invitations to attend the unification ceremony -- reportedly because of Bush's concern over the Persian Gulf crisis -- Kohl trimmed the scope of the event, calling on Germans to be "inward-looking."

The chancellor told Germans last week that they should not be afraid to cry at midnight on Unity Day. He asked them to remember the 192 East Germans who died trying to escape over the Berlin Wall, built in 1961 to prevent them from moving to the West.

Thanking Bonn's allies and especially Bush and Gorbachev for their support of German unity, Kohl declared last night that "We Germans have learned from history. We are a peace-loving, freedom-loving people. There is only one place for us in the world: at the side of the free nations."

Kohl made only an oblique reference to his country's aggressive history, but de Maiziere, who will become a minister without portfolio in the new government, spelled it out.

"Germans have caused immeasurable suffering in this century through two awful wars, the murder of 6 million Jews and many other Nazi crimes," de Maiziere said. "We see this part of our history, which weighs heavily on us, as a continuous reminder to be forgiving and to contribute to understanding among peoples."

Kohl ended his speech with the words, "Germany is our fatherland, the united Europe is our future." De Maiziere closed with "It is not that which we were yesterday, but what we want to be together tomorrow, that unites us in one nation."

The East German People's Chamber, elected in March with the primary task of eliminating itself and its country, ended its work with a ceremonial session at which legislators congratulated themselves for taking the Communist state apart and replacing it with the framework of a democracy.

But legislator Jens Reich, one of the organizers of last fall's mass demonstrations, told his colleagues they had "no reason to sing our praise. We'll get a C grade in the history books." Thirteen of the original 22 East German ministers in de Maiziere's cabinet were fired or quit, either in political battles or because they were revealed to have been informers for the Stasi secret police under the Communist regime. From opening day until its demise, the People's Chamber was haunted by persistent reports that more than 50 of its members had been informers for the Stasi.

Although the 400-member legislature has dissolved, 144 of its members will join the West German Bundestag Thursday and will remain in the all-German body until a new parliament is elected Dec. 2.

Germany received good wishes and statements of trust from Washington, Moscow, Paris and Warsaw Tuesday night. From Jerusalem, however, the Germans received expressions of worry. "We are filled with deep anxiety since it was a united Germany, under the Nazi rule, which brought upon the Jewish people the most horrendous tragedy of this generation," the Yad Vashem museum of the Holocaust wrote to Kohl.

The final goodbye to East Germany came at an East Berlin concert hall where de Maiziere spoke and Kurt Masur, conductor of the Leipzig Gewandhaus orchestra and next conductor of the New York Philharmonic, led a performance of Beethoven's Ninth Symphony at breakneck speed but with rich emotion.

Special correspondent Steve Vogel in Munich contributed to this report.