LIMA, Peru (AP) _ The nation's highest military court Wednesday upheld a life sentence against Shining Path leader Abimael Guzman, the founder of Latin America's most violent insurgency.

The decision by the Supreme Military Tribunal turned down the second and last appeal allowed Guzman's defense, putting to rest any minimal hope Guzman may have held for finding a legal loophole to freedom.

In a communique announced on state television, the military said Guzman will serve his sentence, without possibility for parole, on the island of San Lorenzo. A military tribunal convicted him there on charges of treason was held under extraordinary security.

The statement also said there was evidence linking Guzman directly to the killing of neighborhood leader Maria Elena Moyano, whose assassination turned many residents of Lima's shantytowns against the guerrillas.

More than 25,000 people have died in political violence since the Shining Path took up arms in 1980. The government estimates the rebels have inflicted at least $22 billion in damages to Peru's debilitated economy.

Guzman, a former philosophy professor, was dressed in prison stripes and held in a cage during his heavily-guarded 10-day trial at an island military base. He was sentenced by hooded judges and allowed only a few brief conversations with his attorney, Alfredo Crespo.

Crespo had called the trial a farce and news reports said he planned to take his case to international human rights courts if his appeal was denied.

In his appeal, he said he was denied adequate access to his client and inhibited from presenting a defense. He was not in his office Wednesday night and could not be reached for comment.

''I witnessed what will be recorded as one of history's ugliest judicial processess,'' Heriberto Ocasio, spokesman for a small California-based group that supports the Shining Path who visited Peru last week, said Wednesday in San Francisco. ''It is imperative that all who stand for justice in the world speak out and condemn what has transpired in Peru with the trial of ... Guzman.''

Amnesty International, the London-based human rights group, said the conditions of Guzman's hearings were not adequate for a fair trial.

Few agreed in Peru, where the debate centered on whether Guzman should be put to death despite Peruvian law, which does not allow for capital punishment except in cases of treason during external war.

Even President Alberto Fujimori said he would have liked to have ordered Guzman killed.

The military statement claimed evidence presented during the trial proved Guzman personally ordered the killing of Ms. Moyano on Feb. 14, 1992, one day after she led a march to protest the rebels' efforts to shut down the capital for 24 hours.

Ms. Moyano, deputy mayor of the Villa El Salvador shantytown, was shot in the head at a charity barbecue, and her body was blown apart by a stick of dynamite placed by the assassins as friends and family members watched in horror.

She was a moderate leftist and outspoken critic of both the Fujimori government and the Shining Path. She had become a national symbol of defiance as the rebels stepped up killings of neighborhood leaders who opposed them.

Guzman's imprisonment was a heavy blow to the rebel organization, but they continued to strike around the country in recent days.

In the bloodiest attack, rebels killed 47 members of a small Andean village who had formed a militia to defend against guerrilla incursions.