A German court has found John Demjanjuk guilty of helping to murder more than 28,000 Jews at a Nazi death camp in World War II.
He was sentenced to five years in prison, one year less than prosecutors had asked for, but will be released pending a possible appeal.
Prosecutors said the Ukraine-born Demjanjuk, 91, was a guard at Sobibor camp in Nazi-occupied Poland in 1943.
He denied serving as a guard, saying he was a prisoner of war and a victim too.
Lawyers for Demjanjuk have said they will appeal against the conviction.
"The court is convinced that the defendant... served as a guard at Sobibor from 27 March 1943 to mid-September 1943," presiding Judge Ralph Alt said.
"As guard he took part in the murder of at least 28,000 people," he said.
An estimated 250,000 people died in the gas chambers at Sobibor. Demjanjuk was convicted of being an accessory to the murder of the 28,060 people who were killed there while he was a guard.
Demjanjuk, whose family says he is very ill, has been in custody since being extradited from the US in 2009.
Judge Alt said he had ordered Demjanjuk freed during his appeal as he did not pose a flight risk because of his advanced age, poor health and the fact that he was stateless following his expulsion from the US, where after the war he worked in an Ohio car factory and became an American citizen.
Judge Alt told the Associated Press news agency there were "no grounds" to hold him, adding: "It's the law, and so it's justice. I say he's guilty but it's not a final verdict."
World Jewish Congress spokesman Michael Thaidigsmann responded by saying: "For us the important thing is that he got convicted. It's not up to an organisation like us to say whether he should be in jail or not."
But the Simon Wiesenthal Center's Efraim Zuroff, while describing the conviction as "a very important victory for justice", said he was "very surprised" by the decision to free Demjanjuk.
"We don't think that that's appropriate given the heinous nature of his crimes," he said.
Born in Ukraine in 1920, Demjanjuk grew up under Soviet rule.
He was a soldier in the Red Army in 1942 when he was captured by the Germans.
Prosecutors had argued he was recruited by the Germans to be an SS camp guard and that by working at a death camp he was a participant in the killings. No evidence was produced that he committed a specific crime.
It was the first time such a legal argument was made in a German court.
Central to the prosecution's case was an SS identity card indicating Demjanjuk was posted to Sobibor. The defence cast doubts on the authenticity of the card but court experts said it appeared genuine.
Demjanjuk listened to the verdict sitting in a wheelchair without responding, his eyes covered by dark glasses.
Concerns over his health led to frequent delays in the 18-month trial.
Relatives of some of the people killed at Sobibor said they were satisfied with the verdict.
"It's very emotional - it doesn't happen every day," Rudolf Salomon Cortissos - whose mother was gassed at Sobibor - told Associated Press.
Demjanjuk's son said he was relieved at the decision to free his father "because he has never deserved to sit in prison for one minute", but added that "after everything that he's gone through, it is hard to use a word like happy in any context".
Demjanjuk has already spent eight years in detention in Israel.
In the 1980s, an Israeli court identified him as "Ivan the Terrible", a notoriously sadistic guard at the Treblinka death camp, and sentenced him to death.
His conviction was overturned after new evidence showed that another Ukrainian was probably responsible.