Klaus Barbie, 77, the former Gestapo official who evaded justice for four decades before being condemned to life in prison four years ago for crimes against humanity, has died of cancer in a prison hospital in Lyon, French officials announced yesterday. The announcement did not give the date of his death.

Known as "the Butcher of Lyon" for his hand in the torture, deportations and deaths of 4,000 Jews and Resistance fighters during World War II, the former German intelligence chief in Lyon was twice given the death sentence in absentia by French courts.

Barbie fled to South America in 1951, after being shielded in Europe by U.S. intelligence agents who were interested in his information about other Nazis and the Soviets. He lived in Peru and then Bolivia as a businessman until his cover was blown in the early 1970s by Nazi trackers Serge and Beate Klarsfeld.

But he was not handed over to France until 1983, after a civilian government replaced Bolivian military leaders blocking his deportation.

Barbie, quoted by the German magazine Stern in 1979 as saying, "I regret each Jew I did not kill," was accused of ordering the execution of more than 4,000 people and the deportation of 7,000 French Jews to concentration camps from 1942 to 1944.

Barbie also was described by eyewitnesses as having savagely beaten the leader of the French Resistance, Jean Moulin, before sending him off on a death train to Germany. Others said Barbie tortured and beheaded victims.

Because of a 20-year statute of limitations, his earlier sentences had become void.

The crimes for which he was convicted four years ago included a roundup and deportation to death camps of 44 children and seven teachers from Izieu, a village near Lyon, and 86 people at the General Union of French Jews.

He also was found guilty of deporting several hundred people on the last train to leave Lyon shortly before the Nazis retreated, and for his role in individual tortures, deportations and killings of 38 French Resistance activists and 21 Jews.

He was the first person tried under a French law stating that Nazi officers and soldiers responsible for abominable crimes "should be pursued to the ends of the earth . . . . " Barbie said in court that he had acted as any German officer would have in wartime.

The prosecutors took pains to establish Barbie's personal responsibility for the specific crimes, with maimed, disfigured witnesses testifying to torture at his hands day after day. The names of all the Jewish children shipped to Auschwitz were read. Barbie, his head bowed, listened to the litany with his face pale and his features set.

Klaus Barbie, who was raised in a town outside Bonn, served earlier in his career as an SS officer in The Hague and Amsterdam, where Dutch investigators believe he helped deport 300 Jews to the Mauthausen concentration camp. He was transferred in 1942 to Lyon, the major Resistance center in France's "unoccupied zone."

Moulin, the Resistance leader picked by Charles de Gaulle to unite anti-German groups, was Barbie's biggest catch. Moulin died on a prison train en route to Paris, after being brutually beaten by Nazi leaders.

After the war, Barbie burned off his SS identification tattoo and was captured briefly by the British before escaping. He presented himself to U.S. officers and was installed in a safe house in Augsburg for debriefing on his store of East-bloc intelligence.

Although the French repeatedly asked for his return for trial, the U.S. officials refused, but allowed French authorities to interrogate him. Barbie later was allowed to slip out of the country.

After settling in Bolivia, he opened a sawmill, and later began advising Bolivian military officials and extremists in Argentina. A former Bolivian official testified at his 1987 trial that Barbie founded a rightist death squad, consorted with drug traffickers and helped right-wing leaders get intelligence and arms while in Bolivia. His cover was blown after the Klarsfelds circulated his picture to newspapers around the world.