A U.S. filmmaker jailed for alleged espionage in Venezuela was expelled from the country and returning to the United States on Wednesday in a gesture that could signal a thaw in tense relations between the two countries.

Timothy Tracy's release was secured with the help of former U.S. Rep. William Delahunt, who has long worked to improve often strained U.S.-Venezuelan ties and was hired by Tracy's family as an attorney in the case.

"He's been informally advising us since pretty much the onset and we retained him last week," Tracy's sister, Tiffany Klaasen, said of Delahunt, a member of the U.S. delegation at the March funeral of Venezuelan President Hugo Chavez.  Both she and Delahunt also credited the U.S. State Department.

Tracy's expulsion came just as Secretary of State John Kerry was to meet with Venezuelan Foreign Minister Elias Jaua on the sidelines of a regional summit in Guatemala to discuss strained relations between the two countries, which have been without ambassadors since 2010.

Delahunt acknowledged the coincidence of Tracy's release but said "no conditions" were set by Kerry for the meeting with Jaua.

He said he had intervened on Tracy's behalf with officials in Venezuela -- who he said did not include President Nicolas Maduro -- but "I want to keep those discussions private."

"On both sides there is a desire to have an improvement in the relationship based upon respect, and that's what's important," Delahunt said, suggesting it might help that Kerry, then a Massachusetts senator, met Maduro a decade ago when Delahunt took a delegation of Venezuelans including Maduro on a trip to his district in Cape Cod.

The trip was part of efforts by the so-called "Grupo de Boston" in 2002-2003 to salve internal tensions in the socialist-run South American country after a failed coup against Chavez.

Tracy's expulson was tweeted Wednesday morning by Venezuela's interior minister, Miguel Rodriguez, who described Tracy as having been "captured doing espionage in our country."

Family and friends say the 35-year-old Hollywood producer and actor had been in the country since October making a documentary about Venezuelan politics when he was arrested on April 24 at 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 deemed "ridiculous" allegations by Venezuela that he was a spy. Friends said Tracy hardly spoke Spanish and had been very open about his work as he met with Venezuelans on both sides of the country's deep political divide. Tracy's previous production work had included script consulting on a film about barbershop quartets.

U.S.-Venezuelan relations have been especially tense in recent months. Maduro expelled two U.S. military attaches in March the same day Chavez died, accusing them of trying to foment instability, and Tracy's arrest came amid domestic political turmoil over the opposition candidate's claim that Maduro, Chavez's hand-picked successor, stole April 14 elections.

The Obama administration has backed opposition candidate Henrique Capriles' call for a full recount.

Klaasen said the family spoke frequently to Tracy while he was held.

"He was treated very well," she said. "I was never concerned for his safety."

Klaasen said that even after Tracy was transferred last week to a notoriously unruly prison, El Rodeo, the family was assured he was in no danger.

She said she understood from Tracy's lawyer in Caracas that he was isolated in El Rodeo in a cellblock for foreigners.

A colleague of Tracy's in Los Angeles, Aengus James, said he would be arriving there Wednesday afternoon.