Forty-five years after its defeat and dissection, Germany is again one nation, its leaders facing the formidable task of merging two alien systems and promising that this new power dominating Europe will serve peace.

Massed before the battle-scarred Reichstag building and awash in floodlights, an estimated 1 million Germans from all walks of life joined at midnight in an emotion-laden chorus of the national anthem.Fireworks lighted up the sky, and bells - one of them a replica of the Liberty Bell donated by Americans 40 years ago - pealed near the ruins of Hitler's citadel. Schoolchildren hoisted a huge German flag.

Eleven months after the Berlin Wall fell in a peaceful revolt that cast aside communist overlords, the city that symbolized the Cold War division of Europe rejoiced. It is again the capital of a united Germany.

President Richard von Weizsaecker, presiding with Chancellor Helmut Kohl and other leaders, briefly addressed the surging crowd.

"We want to serve peace in a united Europe and the world," he said.

Many consider the merged nation of 78 million people to have already supplanted the Soviet Union as a superpower, and there is some anxiety among neighbors with bitter memories of Nazi aggression.

Germany's imperialist past was recalled by the Reichstag, the old parliament building heavily damaged in the last days of World War II. On Thursday, it will again be host to German lawmakers.

Although Berlin was the center of celebration, ceremonies stretched into the early morning hours throughout the country.

In more than a half-dozen cities including Hamburg and Leipzig, however, scattered anti-unification violence marred the festive atmosphere.

Many standing before the Reichstag had tears in their eyes during the main celebrations.

"What for many was only a dream is now becoming reality," said Lothar de Maiziere, the soft-spoken musician who, as prime minister, led East Germany through its short democratic life.

Dozens held aloft torches that shimmered in the dark.

As the end came for East Germany and the mighty new country took center stage, Germans were united in thanking Soviet President Mikhail S. Gorbachev.

De Maiziere credited the bold Kremlin leader with clearing the way for East Germany's peaceful revolution by refusing to prop up "an anti-reform system with the force of weapons."

That revolution, part of the massive pro-democracy movement that swept Eastern Europe last year, set off the sprint to full unification.

"We thank President Gorbachev," Kohl said in a televised address to the nation Tuesday night. "He recognized the nations' right to pursue their own path.

"Without this decision, we would not have experienced this day of unity."

Germans face what Kohl himself called a "a difficult path" in meshing together a strong with a collapsing economy.

Businesses in what was East Germany are failing daily, with predictions of up to 4 million people out of work. The former West Germans are showing greater irritation with their poor cousins from the East.

"The daily worries are weighing on many people," said ARD television reporter Hanns Friedrichs of the East Germans in the crowd at the Reichstag and nearby Brandenburg Gate.

"The boundless joy of the opening of the Berlin Wall has long ago flown away," the veteran reporter added.

Yet as midnight approached, the worries were at least temporarily put aside. Happy crowds uncorked champagne and danced under the Brandenburg Gate, the 200-year-old historic monument that had towered above the Berlin Wall.

Among those joining Kohl on the podium at the Reichstag was Willy Brandt, the grand old man of German politics and the former mayor of West Berlin who watched helplessly as the East Germans built the wall in 1961.

"Einigkeit und Recht und Freiheit fuer das deutsche Vaterland" - unity and justice and freedom for the German fatherland - the enormous crowd boomed out as they started the national anthem.

But not all Germans were pleased by unity.

About 70 right-wing extremists in Magdeburg, 60 miles west of Berlin, attacked passers-by with baseball bats and stoned cars. Earlier, leftist radicals rampaged in a club for young people there, injuring several guests.

In Schwerin, another former East Germany city, several hundred leftists and rightists clashed in the city center after the rightists had celebrated unification with the Nazi "Sieg Heil" salute.

Several dozen rightist extremists rampaged through Leipzig, attacking police with bottles, stones and firecrackers, the news agency ADN reported.

Berlin police detained seven people who were caught carrying paint and gas pistols. Another man was arrested after a policeman was stabbed in the arm during a scuffle between police and about 500 youthful demonstrators.

Police in Goettingen, 70 miles south of Hanover, said 1,000 leftist protesters opposed to unification had rampaged through the city.

Authorities said the radicals broke store windows and chanted "Never Again Germany" and "Nazis out."

In Hamburg, drunken young people clashed with police, and several were arrested. Munich police said 2,000 demonstrators rushed into a central square at midnight, some handing out right-wing extremist magazines.