Updated

A federal appeals court has refused to throw out lengthy prison sentences for two U.S. Border Patrol agents convicted of shooting an unarmed illegal immigrant and lying about it.

The 5th U.S. Circuit Court of Appeals in New Orleans on Monday upheld most of the convictions against former agents Ignacio Ramos and Jose Alonso Compean.

The appeals court vacated their convictions for tampering with an official proceeding, but the three-judge panel refused to reverse the convictions that resulted in their lengthy sentences.

A federal jury in Texas convicted Ramos and Compean of assault, obstruction of justice and civil rights violations in the wounding of Osvaldo Aldrete Davila on the Texas border near El Paso in 2005. A federal judge sentenced Compean to 12 years in prison and Ramos to 11 years.

"Some in the media and on the Internet have tried to portray agents Compean and Ramos as heroes, but that narrative is false," U.S. Attorney Johnny Sutton said last December. "The actions of Compean and Ramos in shooting an unarmed, fleeing suspect, destroying evidence, and engaging in a cover-up, are serious crimes."

The convictions of Ramos and Compean caused a national firestorm among conservative lawmakers and others. Critics have repeatedly called the prosecution unjustified and the sentences extreme.

Aldrete survived the February 2005 shooting. He was arrested last month following an October indictment on various drug charges.

In exchange for his testimony against the agents, Aldrete was given immunity from prosecution for allegedly trying to smuggle drugs the day he was shot. Jurors didn't hear evidence that Aldrete allegedly smuggled marijuana in the United States several months after the shooting.

During his trial, Compean testified that he shot in self-defense after seeing what he believed to be a gun in Aldrete's hand. Ramos said he fired in defense of Compean. Aldrete denied having a gun. Both agents acknowledged not reporting the incident.