(CNN) -- A German court convicted onetime Ohio auto worker John Demjanjuk on Thursday in the murder of tens of thousands of Jews at a Nazi concentration camp, capping a 30-year legal saga.

The regional court in Munich found Demjanjuk guilty of assisting in mass murder as a guard at the Sobibor death camp in Poland, the court announced. The 91-year-old Ukraine native has been sentenced to five years in prison, but will be allowed to remain free pending appeal, according to a court statement.

"The guards knew exactly what would happen to the people arriving at the camp, from everyday abuse to gruesome murders," the court said in announcing the verdict. Duties rotated around the camp, "so that every single guard would be involved in all parts of the process," it said.

Demjanjuk's defense argued that he was a prisoner of war who was forced to do what the Nazis wanted. But the court rejected that claim, concluding that Demjanjuk could have fled "despite a certain degree of risk for himself."

The Nazis and their sympathizers killed at least 167,000 people at Sobibor in 1942 and 1943, according to the U.S. Holocaust Memorial Museum. Munich state prosecutors charged Demjanjuk as an accessory to about 27,900 of those deaths, and the court found the killings were "motivated by racial hatred."

Prosecutors had asked for a sentence of six years in what is likely the last major Nazi war crimes trial in Germany.

Jewish groups hailed the verdict soon after it was announced. Israel's Holocaust museum, Yad Vashem, said the trial and ruling show there is no statute of limitations for the crimes of the Holocaust.

"The conviction today of Demjanjuk underscores the fact that even though the policies of the 'Final Solution' -- the systematic murder of 6 million European Jews -- were set and carried out by the German Nazi regime, the murder could not have taken place without the participation of myriads of Europeans on many levels," museum Chairman Avner Shalev said. "Their role was also criminal."

Demjanjuk did not speak during the trial, which began in November 2009, and did not address the court before Thursday's verdict, according to German press accounts.

The court found Demjanjuk is not a flight risk. Before handing down the sentence, judges took into account his age and the eight years he has already served in an Israeli prison on different charges, the court statement said.

Rabbi Marvin Hier, founder of the Los Angeles center named for famed Nazi-hunter Simon Wiesenthal, called the decision to leave Demjanjuk free "an insult to his victims and to the survivors."

"When we first heard the news that Demjanjuk had been convicted of his crimes, we were very pleased that justice had finally caught up with John Demjanjuk," Hier said in a written statement. But allowing his release on appeal "means his victims may see John Demjanjuk strolling in the park in Germany."

But Sobibor survivor Philip Bialowitz thanked German authorities "for their dignified pursuit of justice, and for establishing that Mr. Demjanjuk was guilty of a crime."

"As a personal witness to many of the atrocities committed at Sobibor, I feel that no punishment can ever compensate for the suffering and murder inflicted by people like Mr. Demjanjuk upon so many innocent victims, including my own family members," Bialowitz told CNN. "But I am relieved that at least some justice has been achieved."

The accusations against Demjanjuk date to the late 1970s, when the U.S. Justice Department accused him of being a Nazi guard known as "Ivan the Terrible." His U.S. citizenship was revoked in 1981, and he was extradited to Israel in 1986.

Demjanjuk was convicted in an Israeli court in 1988 and sentenced to death, but that conviction was overturned in 1993 amid evidence that someone else was "Ivan the Terrible."

A U.S. federal court restored Demjanjuk's citizenship, ruling the government withheld evidence supporting his case. But his citizenship was revoked again in 2002 after a federal judge ruled that his 1952 entry into the United States was illegal because he hid his past as a Nazi guard.

Eli Rosenbaum, the Justice Department official who led Demjanjuk's prosecution, said Thursday's verdict caps "many years of extraordinary work" by U.S. and German officials.

"It serves notice on all human rights violators that the passage of time will neither erase the world's memory of their terrible crimes nor end its commitment to holding them to account," Rosenbaum said in a written statement.

Demjanjuk lost a U.S. Supreme Court case against his deportation. His lawyers had asked the high court to consider their claims that he was too ill and frail to be sent overseas. They also raised human rights and other legal issues.

Demjanjuk's defenders say he was a Soviet prisoner of war sent to the Trawniki concentration camp, where Nazis trained prisoners to assist with the extermination of about 2 million Jews in occupied Poland. Those prisoners of war had no choice but to assist, the defense said.

Defense attorney Ulrich Busch said when the trial began that the court was imposing a "moral and judicial double standard." The guards forced to help the Nazis were "victims, not culprits; survivors, not murderers," Busch said.

Higher-ranking German SS officers in a similar situation have been found not guilty of war crimes, the defense argued.

There are very few remaining survivors of Sobibor. Under German law, about 30 relatives of victims were allowed to join the prosecution case as co-plaintiffs.

CNN's Diana Magnay contributed to this report.