The Brazilian Supreme Court late Wednesday denied petitions filed by four nations requesting the extradition of accused Nazi war criminal Gustav Franz Wagner.

Wagner had been sought by West Germany, Poland, Austria and Israel for "crimes against humanity" allegedly committed while a member of the SS. As second in command at the Sobibor and Treblinka death camps, Wagner is accused of supervising the murder of more than a million people.

The Austrian-born farmworker, now 68, turned himself over to Sao Paulo police in May 1978, after a Brazilian newspaper named him as one of several fugitive Nazis who attended a neo-Nazi congress held near here to celebrate the birthday of Adolf Hitler. Wagner's identity later was confirmed in a dramatic police station confrontation with a Sobibor survivor who had worked for him in 1942 and 1943.

Known to prisoners as "the human beast," Wagner never denied that he had held command posts in the extermination camps. He twice attempted suicide after his arrest, and for most of the last year has been held under custody in the isolation ward of a psychiatric hospital just outside Brasilia.

The 10 justices of the Supreme Court concluded that the evidence presented against Wagner constituted proof "beyond any doubt." But in unanimous decisions against three of the petitioners, and with only two justices favoring the West German petition, the court ruled that Brazilian law forbids Wagner's extradition.

The court used different lines of reasoning in rejecting each of the petitions. The Israeli request was denied because Israel was not established until 1948 - after the alleged offenses were committed - and so lacked jurisdiction. Austria's petition was refused because it has stripped Wagner of his citizenship as punishment for earlier war crimes and therefore also was considered to lack jurisdiction.

Although both Sobibor and Treblinka were on Polish soil, the court ruled that extradition papers filed by the Polish government were "deficient." In denying West Germany's petition, the justices cited the statute of limitations.

In a similar proceeding here a decade ago, Franz Paulo, Stangl, Wagner's commanding officer at Sobibor, was extradited to West Germany. There he was tried, convicted and eventually died in prison.

Wagner, who had arrived in Brazil with Stangl in the 1950s after serving as a military advisor to the Syrian Army, had been detained by Brazilian police when he visited the Stangl home soon after the arrest. But after routine questioning, Wagner had been allowed to return to his isolated ranch home.

At a press conference held after Wednesday's court decision was read, Wagner's Lawyer, Flavio Marx, announced plans to sue the West German government for "damages and injuries incurred by my client." Marx told reporters his legal fees had been paid by "German friends of Wagner's who live near Wagner." He declined to name them and charged that "it is unfair to want to judge a man 37 years after an event is supposed to have taken place."