The West German parliament voted tonight to abolish a statute of limitations that, had it stayed in effect, might have allowed some Nazi-era war criminals to escape prosecution for murder.

The 255-to-222 vote came after an all-day, nationally televised debate in the lower house of Bonn's parliament. It followed nine months of a soul-searching and sometimes bitter debate throughout the country on how to deal with the Nazi war crimes question 34 years after the end of World War II.

The issue had also aroused emotions in many other countries, especially in Israel, Poland and the United States and among world Jewry.

Two major factors influencing tonight's vote, it is thought here, were the showing in West Germany in January of the television series "Holocaust" and the dramatic visit last month by Pope John Paul II to the former Auschwitz death camp in Poland.

Under the abolished statute of limitations, any Hitler-era murder suspect who surfaced after January 1, 1980 would have escaped prosecution entirely unless court action had already begun against him.

The movement against the statue included a postcard campaign sponsored by Simon Wiesenthal, a leading Vienna-based Nazi hunter. An avalanche of more than a half million postcards containing a photo of a so-far-unidentified SS guard suspected of murder were sent to Schmidt. Its message said, "This murderer has not been found yet and there are thousands more like him, waiting for January 1, 1980, when finally they can appear in public without fear."

Today's action abolishes the statute of limitations for all murder cases. It means that those still sought or eventually uncovered in connection with wartime murders can be legally pursued and tried for the rest of their lives.

Supporters of limitless prosecution, including Chancellor Helmut Schmidt, argued that Germans could never close the books on the crimes of the Hitler era, no matter how painful or how long ago, and that every criminal who surfaced after the limitation took effect would have been a serious embarrassment to Bonn and fuel for political enemies of the postwar German state.

Opponents argued in parliament that so much time had passed since the war's end that new trials would lead nowhere because witnessess already are extremely hard to find, memories are imprecise and prosecution very difficult, as some recent trials here have shown.

Many Germans also argued privately that it was simply time to stop flailing themselves with the horrors of the past. Many felt that the trials were meant mostly to appease foreign opinion.

Others argued that it was difficult to oppose ending Limitations on legal grounds, for example, without becoming tarred wtih the charge of being sympathetic to pardoning Nazi crimes.

A leading Christian Democratic Party figure who opposed ending limitations, Alois Mertes, warned that retention should not be mistaken for an attitude of "forgive and forget." To equate the two that way, he said, would be a perversion of the legal institution of the statute of limitations, a device used in many countries although usually for lesser crimes.

Mertes, the opening speaker in today's debate, also spoke out against Bonn being subjected to pressure by other countries in deciding how to handle its own legal affairs.

He said Bonn should not capitulate to what he called the ignorance of some Americans who do not understand the fine points of German political argument. He also criticized Israel for exerting heavy pressure on the West German legislature. Israel's position, however understandable, should not be the criterion for independent German justice, Mertes said.

Today, as Klaus Hartmann, a member of the conservative Christian Social Union in Bavaria, was speaking in favor of keeping the statute in force, a small group in the gallery spectators dressed in concentration camp uniforms began shouting that the speaker was asking for "acquittal for muderers."

The protesters were removed by security men with some pushing in a televised scene that the West Germans obviously would have liked to avoid.

The statute, which dates to the 19th century, originally barred prosecution for murder after 20 years had passed. It took on new importance after World War II and was twice extended by the parliament. In 1969, it was extended through 1979.

Since the end of the war, some 83,000 Nazis have been investigated by West German authorities on war crimes charges. About 6,500 of these have been convicted, virtually all of them in the first 15 years after the war. Since then, conviction rates have dropped considerably. Witnessess are dead or hard to find, old mermories are befuddled by defense lawyers, and trials drag on for years.

Mertes points to the acquittal in April, for lack of positive identification, of a former SS doctor and three guards at the Majdanek concentration camp in a trial that has been under way for four years. There are still 10 other defendants.

Justice Minister Hans-Jochen Vogel, who favored lifting the statute, pointed to men like former camp commander Gustav Wagner, who is believed to be responsible for the death of more than 150,000 persons and is in Brazil. "A man like that should be pursued forever," he said.

There are still some 4,700 Germans either under investigation or awaiting sentencing. These cases would not have been stopped had the statute been retained.