However, the three-member panel also upheld his ongoing incarceration, arguing that his sentence could not be “fixed”.
Lawyers for former Ecuadorian vice president Jorge Glas have welcomed the decision to make his arrest inside the Mexican embassy in Quito illegal.
Still, on Friday, lawyer Sonia Vera García vowed to appeal the ruling that upheld her client's continued detention.
“Thank you to the international community,” she said I have written “With that support, the detention was declared arbitrary, a step forward,” it said on social media platform X.
“However, Mr. Jorge remains in custody. We will appeal until his release is achieved.”
The ruling comes after Francisco Hidalgo, a member of Mr. Gras's left-wing Civic Revolution party, filed a writ of habeas corpus earlier this week on behalf of the former vice president, alleging that Mr. Gras was illegally detained. It was given down.
Glass's arrest was the subject of ongoing international tensions. On April 5, Ecuadorian police stormed the Mexican embassy, pointing guns at senior diplomats who scaled the fence and tried to block entry.
In a ruling Friday, Ecuador's three-member tribunal found that the arrests on embassy grounds were indeed “illegal and arbitrary.”
“Without the permission of the Ministry of Foreign Affairs and the political director of the Mexican embassy in Ecuador, the detention became unlawful,” Judge Monica Heredia wrote.
International law protects embassies and consulates from interference by local law enforcement. This “non-aggression principle” theoretically allows diplomats to carry out sensitive work without fear of retaliation from the host country.
But beleaguered public figures like Glass have sometimes turned to embassies for temporary refuge from arrest, knowing that local police cannot enter without permission.
Mr. Glass has been twice convicted on corruption-related charges. In 2017 he was sentenced to six years in prison and in 2020 to eight years in prison.
Hours before his arrest, Mexico's Foreign Ministry announced it had granted political asylum to Mr. Glass, who had been sheltered at the embassy in Quito since December.
However, the embassy attack sparked a full-scale conflict between Mexico and Ecuador.
In response, Mexico severed diplomatic relations and recalled embassy staff from Ecuador. Neighboring Latin American countries and the Organization of American States (OAS) have also condemned the police raid.
But the government of Ecuadorian President Daniel Novoa has sought to defend the raids, which were authorized by executive order.
It further argued that because Mr. Glass's conviction was not the result of persecution, he should not be eligible for political asylum.
But on Friday, a three-judge bench said the government's defense against the raid “lacks legal basis.”
Still, the court ruled that the arrest itself was unlawful, but that given his criminal record, Mr. Glass should remain in prison.
“This court cannot modify the judgment,” Judge Heredia said.
Mr. Glass is currently serving a sentence in Guayaquil and is on a hunger strike in protest. He was hospitalized earlier this week.
On Thursday, Mexico filed a petition with the International Court of Justice to expel Ecuador from the United Nations over the embassy attack, at least until Ecuador formally apologizes for violating international law.