French citizen Florence Cassez, who was jailed in Mexico in 2007 for 60 years for kidnapping, has been freed, after the Supreme Court ruled her rights were violated.
Florence Cassez had denied the charges and many irregularities were found in the case, including a staged televised police raid.
Three judges on a panel of five voted to have Florence Cassez released immediately.
The case provoked tensions between Mexico and France, where news of her release was widely welcomed.
Florence Cassez was driven to Mexico City’s international airport, where she boarded an overnight Air France flight to Paris.
Her mother, Charlotte Cassez, told French television the case had been full of suspense right to the end.
“It’s an explosion of joy. I can’t quite believe it,” she said.
In a statement, French President Francois Hollande said the decision marked the end of a “particularly painful period”.
“France thanks all those who, in Mexico as well as here at home, have fought so that truth and justice prevail.”
Francois Hollande spoke to Florence Cassez by phone on Wednesday evening. Details of the conversation have not been revealed.
“This is a historic day for Mexican justice,” said her lawyer Frank Berton.
Florence Cassez was arrested on December 8, 2005, at a ranch near Mexico City where several hostages were found.
She denied knowledge of the kidnappings, carried out by a gang – the Zodiacs – led by her Mexican then-boyfriend Israel Vallarta, who confessed.
The next day, Mexican TV showed what it described as live footage of a police raid, which it later transpired had been a reconstruction performed at the request of the media.
The Supreme Court judges ruled that the reconstruction had violated Florence Cassez’s rights.
The decision to release her has been sharply criticized by one of the hostages, Ezequiel Elizald.
Ezequiel Elizalde testified against Florence Cassez and has condemned the Supreme Court’s decision as “disgusting”, describing Mexico’s institutions as “filth”.
This was the second time that the Supreme Court had taken a vote on freeing Florence Cassez.
Last March, however, the judges decided against her release, despite acknowledging serious irregularities in the process.
When first convicted, Florence Cassez was jailed for 96 years, but, in 2009, a court of appeal reduced the term to 60 years.
French authorities tried to extradite her, but the move was blocked by the Mexican government.
Francois Hollande’s predecessor in the Elysee Palace, Nicolas Sarkozy, championed the case and repeatedly clashed with the Mexican government of then-President Felipe Calderon.
Diplomatic tensions reached a peak two years ago when Mexican authorities cancelled a high-profile cultural event in Paris.