In October 2011, 66-year-old Carlos Ortega was enjoying semi-retirement from a long career in aviation when armed agents burst through the door of his Bogota home and arrested him. A former commercial pilot and head of security for Colombia’s national aviation authority, he was accused of selling aeroplanes to drug traffickers, jailed and extradited to the US.

Only after a year behind bars and hundreds of thousands of dollars in legal fees was he finally freed by a court in Florida, when it emerged that the US authorities had mistakenly ordered the extradition of the wrong Carlos. Yet in June, Mr Ortega lost an appeal to claim back his legal fees and damages from the American officials who had wrongly identified him.

Mr Ortega and his lawyers claim he was pressured to plead guilty by South Florida federal prosecutor Andrea Hoffman, even after she was alerted to his innocence, and that she also tried to cover up the exculpatory evidence. The appellate court, however, said Ms Hoffmann had “absolute immunity” because she was carrying out her “prosecutorial duties.”

“I don’t understand how there can be immunity under these despicable circumstances — when they destroy your career completely,” Mr Ortega, whose case has been held up as emblematic of problems with the extradition system, recently told the Miami Herald. “If I had been guilty of something, then OK, but my case had been dismissed.”

In 2004, Mr Ortega had gone into business as a plane broker and consultant. After his arrest, he was told that he had been heard on a wiretap selling aircraft to drug traffickers, including one man who had previously worked as a pilot for the late Pablo Escobar, who until his death in 1993 was the infamous leader of the Medellin Cartel.

But when a private investigator looked into the wiretap claims on Mr Ortega’s behalf, he soon found that his client had been mistaken for a second man, also named Carlos, who had also featured in the wiretaps and was indeed involved in criminal activity. The prosecutors had confused the two for the same Carlos, due in part to a simple transcription error. “An eight-year-old child could have told you that our voices were completely different,” Mr Ortega said.

Mr Ortega’s lawyers informed their US authorities of their mistake in March 2012, by which time the 66-year-old had spent five months incarcerated alongside drug lords and other violent criminals at Bogota’s maximum security prison, La Picota. American DEA agents in Colombia also told Ms Hoffman that they feared they had the wrong man, Mr Ortega claimed in a lawsuit, but she ordered the agents to keep the wiretaps proving his innocence under wraps.

With the warnings ignored, Mr Ortega was extradited to Miami to face trial in June 2012. Prosecutors allegedly told him he could return home if he pleaded guilty, but he refused. On 31 August that year, all the charges against him were dropped and he was allowed to return to Bogota. But by that time his business was gone and he was deep in debt.

In 2015, he sued the US and Ms Hoffman for false imprisonment, false prosecution and seven other charges, hoping to be reimbursed for his financial losses and personal distress. His legal fees alone ran to almost $300,000. But this summer the US Court of Appeals in the Southern District of Florida tossed out his lawsuit, saying the US had “sovereign immunity” and that Ms Hoffman was similarly protected from legal action despite the evidence of her misconduct.