A U.S. filmmaker who was arrested In Venezuela for allegedly instigating unrest was released from custody and expelled from the Latin American nation, his attorney said Wednesday.

Tim Tracy, a 35-year old documentary filmmaker from Los Angeles, boarded a flight from Caracas early Wednesday morning bound for Miami after being released from Venezuela’s notorious El Rodeo prison. He was arrested in April at the Caracas airport for allegedly fomenting unrest and funding opponents of President Nicolás Maduro.

Tracy was released because there was not sufficient evidence to hold him, his attorney Daniel Rosales told Globovision.

"Everything worked out well in the end," Rosales said, according to reporter Girish Gupta via his twitter account.

Tracy's release was secured with the help of former U.S. Rep. William Delahunt, a Democrat from Massachusetts, said Tracy’s sister, Tiffany Tracy Klaasen.

"He's been informally advising us since pretty much the onset," she said of Delahunt, who had represented the United States at the March funeral of longtime Venezuelan President Hugo Chavez.

Tracy had been making a documentary about Venezuelan politics for about six months, family and friends said. He was arrested on April 24 at the Caracas' airport as he tried to leave the country to attend his father's 80th birthday in suburban Detroit.

U.S. President Barack Obama had called "ridiculous" Venezuelan government allegations that Tracy was a spy who was trying to destabilize the country.

Tracy's expulsion came just as U.S. Secretary of State John Kerry was to meet with Venezuelan Foreign Minister Elias Jaua at a regional summit in Guatemala.

It was confirmed by Venezuelan government spokesman Raimundo Urrechaga and was tweeted by the country's interior minister, Miguel Rodriguez, who described Tracy as having been "captured doing espionage in our country."

Venezuelan officials claimed Tracy paid young protesters to participate in violent demonstrations against the ruling party, which narrowly won the April 14 presidential election.

Freedom of press groups praised the release of Tracy, claiming his arrest was only a way for the Maduro government to save face during the turmoil following the contested election.

“If the charge of espionage was real and proved, why is he now expelled?” Delphine Halgand of Reporters Without Borders said in an email to Fox News Latino. “We believe that there was no evidence, but the Venezuelan government, in a tense post-elections context, did not want to loose the face and then decided to throw the case - and therefore the man - away.”

The opposition is contesting the results because it says Maduro – the successor to late Venezuelan leader Hugo Chávez - won by fraud.

Tracy was recently moved from the SEBIN secret police lockup in Caracas to El Rodeo prison, which has become known for its violence and overcrowding.

Venezuela's prisons are badly overcrowded and plagued by lawlessness, with an estimated 70 percent of inmates awaiting trial. El Rodeo was controlled by armed, drug-dealing gangs before the June 2011 riot. Afterward, inmates held it for nearly a month before troops retook it.

The Associated Press contributed to this report.

Follow us on twitter.com/foxnewslatino
Like us at facebook.com/foxnewslatino