JERUSALEM (AP) _ John Demjanjuk's defense rested much of its case on testimony that a Ukrainian named Ivan Marchenko was the real ''Ivan the Terrible,'' the sadistic gas chamber operator at the Treblinka death camp.

If still alive, Marchenko would be 82. Reportedly he was last seen coming out of a brothel in the Adriatic city of Fiume in March 1945, and joined up with Yugoslav partisans to escape advancing Allied forces.

Demjanjuk was acquitted as ''Ivan'' on Thursday because of reasonable doubt triggered by the depositions from Treblinka guards who fingered Marchenko in testimony to the Soviet KGB.

Israeli prosecutors didn't dispute the existence of Marchenko, on whom the Soviet KGB had compiled a Nazi war crimes file. They said it was possible there were two ''Ivans'' who at different times operated gas chambers in Treblinka - Demjanjuk and Marchenko. Some 850,000 Jews were killed in the camp in 1942-43.

Demjanjuk's son-in-law, Ed Nishnic, said Thursday he was determined to track down Marchenko or his remains.

Nishnic said he has obtained a secret 1962 KGB report placing Marchenko in the area of Fiume, now called Rijeka, in Croatia.

The report said Marchenko was on a list of Soviets who had renounced their Soviet citizenship ''and now live abroad,'' according to Nishnic.

According to material from Marchenko's KGB file, he was born in 1911 in the village of Sergeyivka in the Dnepropetrovsk region of the Ukraine. Marchenko was drafted into the Soviet Red Army during World War II and was captured by the Germans in July 1941.

Shortly after capture, he volunteered as a Nazi guard and was sent to the Trawniki camp where east European prisoners of war were trained to help in the extermination campaign against Jews and Gypsies. From there, he was dispatched to Treblinka.

According to depositions by Treblinka guards, Marchenko ran the gas chambers and was dubbed ''Ivan the Terrible'' by the inmates.

Nikolai Shalayev, a fellow gas chamber operator at Treblinka, said in his deposition he and Marchenko left for Trieste, Italy, in the summer of 1943.

Marchenko was dispatched to guard German warehouses in Trieste, according to the depositions. When the allied forces advanced, Marchenko fled and found refuge among Yugoslav partisans.

Shalayev, who was later executed, said Marchenko was last seen coming out of a brothel in Fiume in March 1945.

Nishnic said he tracked down Marchenko's wife, Kateryna, who was said to be living in the city of Kryvy Rog in Ukraine. Nishnic arrived at Mrs. Marchenko's apartment in February 1992, 40 days after she had died.