NEW YORK (AP) — A federal appeals court on Friday upheld the life sentence given to a former Osama bin Laden aide who stabbed a federal prison guard in the eye even though it agreed there should have been greater efforts for him to attend his sentencing so he did not have to watch the proceeding on a video monitor.

The 2nd U.S. Circuit Court of Appeals in Manhattan said Mamdouh Mahmud Salim's right to be present at his resentencing hearing two years ago was violated but that the error was not severe enough to warrant another sentencing.

U.S. District Judge Deborah Batts had imposed the life sentence for what she called his "unusually cruel, brutal" attack in 2000 on guard Louis Pepe. The attack occurred at the Metropolitan Correctional Center in lower Manhattan as Salim awaited trial in the August 1998 bombings of two U.S. embassies in Africa. The attacks killed 224 people, including a dozen Americans. Before the Sept. 11 attacks, Salim was believed to be the highest-ranking al-Qaida member held in the United States.

Salim, 54, challenged the fact that he only appeared at sentencing on video and said there were technical difficulties in the videoconference link from the prison where he was housed.

"Although it is an issue of first impression in this circuit, every federal appellate court to have considered the question has held that a defendant's right to be present requires physical presence and is not satisfied by participation through videoconference," the appeals court wrote. Still, it added: "In these circumstances, Salim was not prejudiced."

A defense lawyer and prosecutors did not immediately comment on the ruling.

The stabbing left Pepe brain-damaged and blind in one eye. Besides the prison sentence, Batts had ordered Salim to pay $4.72 million in restitution to cover the medical expenses for Pepe's continuing rehabilitation.

The resentencing occurred because the appeals court found that the judge's original sentence in 2004 of 32 years in prison did not properly consider the terrorism aspects of the offense.

At the resentencing, Salim said: "I'm not a criminal. I'm not a terrorist." He said the stabbing occurred on Nov. 1, 2000, as he was trying to get to his defense lawyers to force them out of the case because he believed they were federal agents.

He sprayed Pepe with hot sauce to blind him before stabbing him in the eye with a sharpened comb he had hidden in his cell in a high-security wing of the federal lockup next to federal court. He has said he intended to stab the lawyers so they could no longer represent him.

At the 2004 sentencing, Salim called the attack "the biggest mistake in my life."

The appeals court said it considered allegations that Salim had waived his right to attend his resentencing because he feared intimidation and physical abuse. It said the government had not established that Salim was lying about the abuse, that the fear he expressed was reasonable or that he would not have attended even if his safety could be assured.

It said the judge failed to assess whether Salim's alleged fears were reasonable or whether assurances could have been made that his safety would be protected.