JERUSALEM (AP) _ John Demjanjuk whispered, ''You are a liar'' in Hebrew Monday after a Treblinka death camp survivor testified that the retired Ohio autoworker was the sadistic Nazi guard ''Ivan the Terrible.''

As Prime Minister Yitzhak Shamir watched from a front-row seat at Demjanjuk's trial, witness Eliahu Rosenberg gave a graphic description of naked inmates being burned alive with chemicals for trying to escape Treblinka's gas chambers.

After defense attorney Mark O'Connor asked Rosenberg why he did nothing to help the victims, Rosenberg gestured towards the Ukranian-born Demjanjuk, then shouted: ''Ask him what would have happened to me.

''I ask the court, in what manner could I have helped them? By screaming? They would have shoved me straight into a pit of blood,'' Rosenberg said.

At that point, presiding Judge Dov Levine said he heard Demjanjuk say something and asked O'Connor to repeat the defendant's words for the court.

After speaking briefly with his client, O'Connor repeated Demjanjuk's statement, which he said was made in Hebrew. ''He said, 'You are liar,''' O'Connor reported.

''Bear this in the context of a man sitting in a cell for one year, suffering in his own way,'' O'Connor added. ''He said what he said in Hebrew ... to show us he's human, to show us he has emotions.''

Demjanjuk, accused of Nazi war crimes, has denied charges he beat and tortured inmates before switching on the gas chamber engines at the Treblinka death camp in Nazi-occupied Poland, where more than 850,000 Jews perished in 1942-43.

His defense attorneys say Demjanjuk, 66, is a victim of mistaken identity. They maintain the real Ivan was killed in an August 1943 prisoner uprising.

Demjanjuk's statement was the first time since the trial opened Feb. 16 that he has contradicted testimony by Rosenberg and another Treblinka survivor who identified him as the brutal Ukrainian guard ''Ivan.''

Demjanjuk's attorneys will have an opportunity to present their version of events later in the trial when defense witnesses are summoned, but on Monday Judge Levine left it for O'Connor to decide whether Demjanjuk's words were relevant for the record.

Last week, Demjanjuk tried to shake hands with Rosenberg when the witness approached him to identify Demjanjuk as the guard Ivan.

Shamir, 71, who spent an hour listening to the testimony, told reporters that he was moved and shocked.

''I am full of admiration for the witness I heard. I don't know where he (Rosenberg) derives the strength to be able to discuss the most minute details of the horrors of that camp,'' said Shamir, whose parents and other close relatives died at Auschwitz in Poland.

Under cross-examination, Rosenberg described how 20 to 30 naked prisoners tried to knock over a barbed wire fence to escape being driven to the gas chambers.

The attempt failed and guards threw some prisoners into a burial pit and shot them. Others were shoved into a gas chamber where they were burned alive by lime chloride, a decomposing chemical guards poured from holes in the chamber's ceiling, Rosenberg said.

''In the morning, I did not take out corpses, I took out pieces of skin,'' Rosenberg said. ''Their skin came off in my hands. We had to pull them out by the hair, they were so red and bloated. They were just tissue.''

Rosenberg, the second Treblinka survivor called to testify, testified again about the children he heard screaming in the gas chambers.

''Inside the gas chambers, I would hear the screams of these poor people, because by that time they already knew it wasn't a shower,'' he said. '''Mommy, Papa, Mother, Father,' the screams. And the gas entered the gas chambers and slowly all the noise died down.''

''It would take 15 or 20 minutes and all I could hear were groans. Then somebody, a German, would put his ears to the door and say: 'Everyone's asleep. Open up.' Then we would open the doors and take out the corpses,'' he said.

O'Connor, who is from Buffalo, N.Y., closely questioned Rosenberg to show his memory could be faulty. He revealed a five-year discrepancy between Rosenberg's testimony about his age and what he told the court in June 1961 during the trial of Holocaust mastermind Adolf Eichmann.

During the Eichmann trial, Rosenberg said he was 35 when he was really 40. He also testified he was 18 when he arrived at Treblinka, when he was actually 21.

''After the war, with the torments of the death camp and everything, perhaps I forgot the age, I don't know,'' Rosenberg told the court.

Under cross-examination, Rosenberg acknowledged he had described ''Ivan'' to Israeli investigators in 1976 as being dark-skinned. ''Thank you very much, Mr. Rosenberg,'' O'Connor said, nodding in the direction of the fair-skinned, rosy-cheeked Demjanjuk.

Demjanjuk's Israeli attorney, Yoram Sheftel, also revealed discrepancies in Rosenberg's testimony in 1976 and 1978, when he was asked by Israeli investigators to identify the Ukrainian guard from an eight-picture lineup.

Reading from the statements, Sheftel said in 1976 Rosenberg pointed to a 1951 photo of Demjanjuk, saying it was like ''Ivan'' but he could not be sure because the man in the picture was ''heavier and fuller-faced.''

But Sheftel said that two years later, Rosenberg pointed to a different photo, said ''it reminds me of a Ukrainian guard at Treblinka'' and overlooked the picture of Demjanjuk.

The hearing was interrupted when Martin Loker, a Holocaust survivor, stood up and shouted in Hebrew: ''Killer, shame on you killer 3/8 You bandit 3/8'' Judge Levine ordered police to remove Loker, a Romanian immigrant whose family perished in the Holocaust.