East and West Germany marked the 40th anniversary of the Nazi capitulation today with contrasting ceremonies that reflected different interpretations of the event that divided their people into rival camps.

Their observances came as the victorious World War II allies also marked the day. Queen Elizabeth and other British leaders attended a service at Westminster Abbey that had reconciliation as its theme and French President Francois Mitterrand voiced similar sentiments in a wreath-laying at the tomb of France's unknown soldier. Soviet leader Mikhail Gorbachev, speaking at a Kremlin rally, denounced U.S. "imperialism" as a "war menace" while renewing a call for detente.

In East Berlin, communist authorities declared a public holiday to celebrate the victory of "antifascist fighters." East German leader Erich Honecker, who was imprisoned by the Nazis for 10 years, laid a wreath at a Soviet war memorial honoring Russian soldiers killed in battle.

The festivities also included a mass youth rally along with a torch-lit tattoo led by goose-stepping soldiers down the Unter den Linden boulevard in East Berlin. But representatives of the United States, France and Britain, who were Moscow's allies in the war against the Nazis, boycotted the events because of antiwestern overtones.

In West Germany, the anniversary evoked a mood of solemn reflection in low-key official ceremonies. The Bonn government sought to curtail commemorations in an effort to quell the highly charged emotions generated by months of feverish debate about how the country should cope with the war's legacy.

Public anguish over the anniversary seemed to culminate in the anger and frustration that engulfed West Germany amid the uproar in the United States over President Reagan's visit to the Bitburg military cemetery, where those buried include 49 Nazi SS troops. In turn, many people here discerned an anti-German bias, or unwillingness to accept Bonn as a reconciled ally, in the storm of hostile criticism.

In the only official events today marking the end of the war, Chancellor Helmut Kohl attended an ecumenical religious service in Cologne's cathedral and President Richard von Weizsaecker delivered a somber address to parliament.

Von Weizsaecker noted that May 8 was not a day for Germans to celebrate but rather one to contemplate those who died in the war launched by a tyrannical regime.

"We remember especially the 6 million Jews who were murdered in German concentration camps," he said. "The genocide of the Jews is without parallel in history."

"We remember all peoples who perished, above all the countless number of Russians and Poles . . . the Sinties and Romanies two Gypsy tribes , the homosexuals, the mentally ill, those who died for their religious or political convictions."

Von Weizsaecker, 65, who served as a lieutenant on the eastern front, told his fellow Germans that while only a few may have been guilty of seeking to exterminate innocent people, many must bear the shame of passively tolerating the slaughter of fellow citizens.

"Who could remain unsuspecting after the synagogues had burned, after the lootings," he said. "Those who opened their eyes and ears, who wanted to find out what was going on, could not miss seeing the deportation trains rolling by."

"In reality, not only the perpetrators but all of us -- even my generation, which was too young to be involved in the planning and execution of this crime -- tried not to recognize what was happening," he said. "And then, when the whole unspeakable truth of the Holocaust became evident at the end of the war, all too many of us pleaded not having known anything."

While rejecting the notion of collective guilt of an entire nation, von Weizsaecker said every German "who has consciously experienced this period must ask himself about the extent of his own involvement."

Noting that the majority of Germans today were not alive when the war ended, he said: "Nobody with any feelings expects young people to wear hair shirts just because they are Germans. But their ancestors have left them a heavy legacy. We all, whether guilty or not, whether young or old, must accept our past. Youth is not responsible for what happened then, but they are responsible for what will be made of it."

Von Weizsaecker warned against a tendency among Germans to lay the blame for the division of their nation with the victorious allies instead of with the failed designs of the Hitler regime.

"The division of Europe into two different political systems was confirmed by postwar developments," he said. "But without the war started by Hitler, it would not have taken place."

He said that the suffering endured by those Germans expelled from the eastern territories or deprived of freedom by postwar communist governments should not be associated with Germany's surrender 40 years ago, but rather with the Nazis' rise to power 12 years before the war ended.

"The origins lie in the beginning of the war and the rule of terror that led to it," he said. "We cannot separate May 8, 1945, from Jan. 30, 1933," when the Nazis took power.