An Italian court ruled on Friday that an Eritrean man arrested in 2016 was the victim of mistaken identity and not a human-trafficking kingpin dubbed “The General.”

Judges still sentenced the man to five years in prison for abetting people smuggling, but ordered his immediate release as he has already spent three years in jail.

The verdict deals a blow to Italian and British investigators who worked in a joint operation to secure the arrest of the man, whom they claimed was Medhanie Yehdego Mered – an Eritrean smuggler considered the mastermind of an international network responsible for the deaths of hundreds of migrants in the Mediterranean.

Both countries had hailed his arrest as a huge victory in the battle against international human trafficking. But the man always insisted he was a refugee called Medhanie Tesfamariam Behre, denying all the criminal allegations.

“What we have always said has been recognized as true and I mean the fact that my client is not the General Medhanie Yehdego Mered. This is a great success for us and a moment of truth,“ Behre’s lawyer Michele Calantropo told reporters after the Sicilian court issued the verdict. He also said his defendant has applied for asylum in Italy.