Venezuela has deported an American film-maker who was arrested in April over accusations of spying and plotting with opposition student groups to destabilise the country.
"The gringo Timothy Hallet Tracy, who was captured while spying in our country, has been expelled," Interior and Justice Minister Miguel Rodriguez Torres said on Twitter.
Tracy's lawyer, Daniel Rosales, said the charges against his client had been dropped, and the 35-year-old returned to the US on a commercial flight to Miami.
The outcome of the case was seen as a test of new Venezuelan President Nicolas Maduro's intentions towards Washington following years of hostility from his predecessor, the late Hugo Chavez.
Tracy's release came hours after US Secretary of State John Kerry announced he and Venezuelan Foreign Minister Elias Jaua had agreed to find new ways to forge positive relations between their two countries, long at political loggerheads.
"We agreed today, both of us, that we would like to see our countries find a new way forward, establish a more constructive and positive relationship," he said after a meeting with Jaua on the sidelines of a meeting of the Organisation of American States in Antigua, Guatemala.
Kerry welcomed Venezuela's decision to release Tracy from prison as a "positive development".
He said he hoped the two countries could move quickly to appoint mutual ambassadors, which they have been without since 2010.
Tracy's sister Tiffany Klaasen told the Reuters news agency that a former US congressman from Massachusetts, William Delahunt, who has worked to foster better relations between the two countries, helped win his release.
Delahunt was part of a small US delegation at Chavez's funeral in March. He has been advising Tracy's family since his arrest.
Friends and relatives of Tracy said he was making a documentary in Venezuela ahead of its April 14 presidential election.
He was arrested 10 days after the vote as he tried to fly out of the country amid a flurry of accusations by the government that included claims of assassination plots against Maduro from US soil.
Venezuela said intelligence agents had been tracking Tracy since late 2012 and had uncovered ample evidence he was plotting with anti-government groups to provoke a "civil war".
Several dozen Venezuelan film-makers had appealed for Tracy's release.
'Grand chief of devils'
During a trip to Latin America in early May, President Barack Obama called the accusations that Tracy was a spy "ridiculous," infuriating Venezuela's government and reviving accusations of "imperialist meddling" that became routine during Chavez's polarising 14-year rule.
Former bus driver Maduro, who was elected president on April 14, described Obama as "the grand chief of devils" and issued a formal protest note.
However, Venezuela's president, who narrowly won the vote amid allegations of foul play by both sides, has at times also seemed to strike a more conciliatory note.
Washington has held back recognition of Maduro, and a US official said this week that there remained concerns about how deep post-election divisions would be resolved.