John Demjanjuk, convicted Nazi death camp guard, was sentenced by a German court to five years in prison for 28,060 counts of accessory to murder. But he was freed pending appeal and died in a nursing home. (JOHANNES SIMON/GETTY IMAGES)

John Demjanjuk, a native Ukrainian who became an Ohio autoworker after World War II and the target of a decades-long international effort to prove that he participated in genocide as a guard at Nazi prison camps, was found dead March 17 in Bad Feilnbach in southern Germany. He was 91.

Martin Winkler, a spokesman for the Bavarian police, confirmed that Mr. Demjanjuk was found dead early Saturday in his room in a nursing home. The cause of death was being investigated, he said. The Associated Press quoted Mr. Demjanjuk’s attorney as saying he had myelodysplastic syndrome, a disease of the bone marrow and blood.

In May, Mr. Demjanjuk was convicted of 28,060 counts of being an accessory to murder at the Sobibor death camp in Nazi-occupied Poland. Although sentenced to five years in prison, he was freed pending an appeal.

Mr. Demjanjuk (pronounced dem-YAHN-yuke) was twice sentenced to death and then freed, and he was twice stripped of his U.S. citizenship. He and his attorneys fought more than a dozen criminal cases and civil suits — with trials in the United States, Israel and Germany — over allegations that he had worked as a prison guard.

He maintained that war-crime accusations against him were a matter of mistaken identity. He had been a soldier in the Soviet army, and he contended that after he was captured by the Germans, he was a prisoner of war and not a guard at a Nazi death camp.

U.S. Justice Department officials made several attempts to deport him because of allegations that he had lied about his wartime activities on his immigration papers. He was deported to Germany in May 2009 after losing a court battle and was charged by law enforcement officials there with 27,900 counts of being an accessory to murder as a prison guard at Sobibor. In June 2010, the court raised the number of charges.

In May 2011, a German court found Mr. Demjanjuk guilty and sentenced him to five years in prison. In reading his sentence, the presiding judge, Ralph Alt, said that no guard at Sobibor could have avoided participating in the killing and that every guard “knew he was part of an organization with no other purpose but mass murder.”

The Demjanjuk case represented one of the last major efforts by the Office of Special Investigations, a Justice Department unit formed in 1979, to identify, investigate and take legal action against suspected Nazi war criminals who resided in the United States, said department spokeswoman Laura Sweeney.

Mr. Demjanjuk’s legal ordeal began in the late 1970s, when the U.S. Immigration and Naturalization Service charged him with lying on his application form and began deportation hearings to strip him of his citizenship.

The case against Mr. Demjanjuk, a retired Ford autoworker, first drew international attention in 1986, when he was extradited to Israel for the first war-crimes trial there since the prosecution of Adolf Eichmann a quarter-century earlier. Eichmann, often called the architect of the “final solution” — the Nazis’ plan to exterminate European Jews — was hanged as a war criminal in 1962.

Mr. Demjanjuk’s trial in Israel included testimony from several Holocaust survivors who insisted that he was “Ivan the Terrible,” a sadistic gas-chamber operator at the Nazi extermination camp of Treblinka in Poland. More than 800,000 prisoners are reported to have died at Treblinka.

In 1988, Mr. Demjanjuk was convicted of genocide and crimes against humanity and was sentenced to hang.

In 1993, the Israeli Supreme Court ordered his release based on newly obtained documents from former Soviet-bloc countries. The documents suggested that Mr. Demjanjuk might have been a Nazi guard but that Ivan the Terrible was probably a man named Ivan Marchenko. Prison workers were building Mr. Demjanjuk’s gallows when the order came to release him.

Mr. Demjanjuk lost his U.S. citizenship in 1981, regained it in 1998 and lost it again in 2002, when the Office of Special Investigations brought a case based on war documents linking him to several Nazi concentration camps other than Treblinka. The new case did not allege that he was Ivan the Terrible.

As the years passed and memories faded, and as victims and perpetrators died, Nazi hunters came to regard Mr. Demjanjuk as one of their most important remaining targets.

His supporters, many of them in the Ukrainian-American community, considered him a martyr. They raised millions of dollars for his defense, and neighbors voiced support for the man they knew as a kindly grandfather who kept his lawn neatly trimmed.

To others, he was a monster.

“If someone worked at a Ford plant, they made cars for a living,” Neal Sher, a former OSI head, told the Los Angeles Times. “If someone worked at Sobibor, they killed Jews for a living.”

Ivan Demjanjuk was born April 3, 1920, in the Ukrainian village of Dubovi Makharyntsi, then part of the Soviet Union. He grew up amid the poverty and political chaos that characterized Ukraine between the first and second world wars. During the famine that afflicted Ukraine in 1932 and ’33, his family moved to a collective farm outside Moscow.

“My relatives were forced to eat birds, mice, rats — even our pet cat,” he once said. “People were lying dead in their homes, in the streets. Bodies were bloated by the rays of the sun. No one took them to be buried.”

In 1938, Mr. Demjanjuk joined the Soviet youth organization Komsomol, and a year later, he was drafted into the Soviet army. In June 1941, the Germans invaded the Soviet Union, and he was wounded in fighting near Kiev.

He was wounded a second time in 1942, and he ended up in a Nazi forced-labor camp. Decades later, he testified that conditions were so bad in Nazi prisoner-of-war camps, “I would have sold my soul for a loaf of bread.”

The murky events of the next three years were at the core of the controversy that consumed the final decades of Mr. Demjanjuk’s life.

He insisted that he was imprisoned at a labor camp near Chelm, Poland, and that in the final year of the war, he joined the army of an anti-Stalinist Russian general, Andrei A. Vlasov. The Vlasov army was made up mostly of Ukrainian soldiers who allied themselves with the Nazis with the goal of defeating the Soviet Union and liberating Ukraine. After the war, the Soviets executed Vlasov for treason.

Mr. Demjanjuk, like many of Vlasov’s men, was sent to a displaced-persons camp, where he remained for seven years. He met and married a Ukrainian woman, Vera Kowlowa, in the camp, and the couple immigrated to the United States in 1952.

Sweeney, the OSI spokeswoman, said documents and testimony from those who served with Mr. Demjanjuk during the war support the following narrative:

In mid-1942, Mr. Demjanjuk joined a force of non-German Nazi auxiliaries whose mission was to exterminate Jews in eastern Poland. He became an armed guard of civilian prisoners at the Majdanek concentration camp in eastern Poland, at Sobibor and at the Flossenburg concentration camp in Germany.

After the war, Mr. Demjanjuk lived in a Cleveland suburb and worked at a Ford assembly plant for nearly 30 years. He attended a Ukrainian Orthodox church and helped his wife raise their three children. He became a U.S. citizen in 1958.

Survivors include his wife; three children, John Demjanjuk Jr., Lydia Maday and Irene Nishnic; seven grandchildren; and two great-grandchildren.

Addressing a three-judge panel in Israel in 1987, Mr. Demjanjuk said he had never killed anyone.

“I couldn’t even kill a chicken,” he said. “My wife had to do it.”

bernsteina@washpost.com

Staff writer Michael Birnbaum contributed to this report from Berlin.