WASHINGTON — Joshua Holt, a Utah man who traveled to Venezuela in 2016 to marry a woman he met online but soon found himself jailed and later branded the CIA’s top spy in Latin America, has been welcomed home by his family and President Donald Trump.

Holt, 26, says he was “overwhelmed with gratitude.”

He and his wife, Thamara Caleno, arrived Saturday evening at Washington Dulles International Airport for a tearful reunion with his parents, Laurie and Jason Holt. A few hours later, Trump welcomed them to the White House.

“Those two years, they were a very, very, very difficult two years,” said an emotional Joshua Holt, sitting next to Trump in the Oval Office. “Not really the great vacation that I was looking for. … I’m just so grateful for what you guys have done.”

To Holt, Trump said: “You’ve gone through a lot. More than most people could endure.”

Holt’s mother, Laurie, thanked Trump and the lawmakers for her son’s safe return, adding: “I also want to say thank you to President Maduro for releasing Josh and letting him come home.”

Their release came one day after Sen. Bob Corker, R-Tenn., held a surprise meeting in Caracas with Venezuelan President Nicolas Maduro, who the Trump administration says runs a “dictatorship” and just won re-election in a “sham” vote.

Trump, in a tweet, described Holt as a “hostage.” The U.S. contended Holt was held on trumped-up charges.

Months of secret, backchannel talks between an aide to Corker, chairman of the Senate Foreign Relations Committee, and close allies of Maduro preceded their return. Yet Holt’s release had seemed unlikely even a week ago.

Joining Trump in the Oval Office were Corker, Utah Sens. Orrin Hatch and Mike Lee, and Utah Rep. Mia Love, all Republicans. The lawmakers thanked Trump for his support.

The White House learned from Corker on Friday of Holt’s impending release, according to a U.S. official who has closely followed Holt’s plight and spoke on condition of anonymity to describe the private talks.

Holt and his wife were reunited at the Caracas airport with her daughter from a previous relationship, and all three boarded a chartered flight to Washington. “We are on our way home,” Corker tweeted.

When he departed the Caracas airport earlier, Holt told The Associated Press that the ordeal had left him “exhausted.”

Venezuela’s communications minister, Jorge Rodriguez, said their release was a goodwill gesture that followed months of dialogue between the Maduro government and U.S. lawmakers.

“We’re praying that this type of gesture … will allow us to strengthen what we’ve always sought: dialogue, harmony, respect for our independence and respect for our sovereignty,” he said.

Holt set out for the South American country in June 2016 to marry a woman he met online while looking for Spanish-speaking Mormons who could help him improve his Spanish. He had planned to spend several months in Caracas that summer with his new wife and her two daughters, to secure their visas so they could move with him to the U.S.

Instead, the couple was arrested that June 30 at her family’s apartment in a government housing complex on the outskirts of Caracas. Authorities accused him of stockpiling an assault rifle and grenades and suggested that his case was linked to other unspecified U.S. attempts to undermine Maduro’s rule amid deep economic and political turbulence.

They were held in a notorious Caracas prison, run by the secret police, that also is home to dozens of top Maduro opponents jailed during the past few years of political unrest in the country. Their trial was set to begin this month after repeated delays that led the Trump administration to question the motives for his detention.

Until Trump’s tweet on Saturday, the U.S. had stopped short of publicly calling Holt a “hostage.”

Holt’s release looked unlikely a week ago, when he appeared in a clandestinely shot video railing against the Maduro government and saying his life was threatened in a prison riot. In retaliation, socialist party boss Diosdado Cabello, a powerful Maduro ally, said on state television that Holt was the CIA’s top spy in Latin America.

The White House press secretary said in a statement Saturday night that U.S. policy toward Venezuela was not changing even while thanking the government for releasing the Holts. The statement also called the recent elections “illegitimate” and urged the release of all political prisoners.

The Trump administration has threatened crippling oil sanctions on Venezuela for Maduro’s decision to go forward with the presidential election last week.

The U.S. government at first avoided ratcheting up public pressure on Venezuela in light of their already strained relations, but eventually raised Holt’s case with the highest levels of the Venezuelan government and decried his treatment in prison.

Corker was seen live on state TV on Friday shaking hands with Maduro and being greeted by first lady Cilia Flores as he entered the presidential palace. Corker left an hour later; neither the senator nor the president made any statements.

In a statement, the Holt family said, “We thank you for your collaboration during this time of anguish. We ask that you allow us to meet with our son and his wife before giving any interviews and statements. We are grateful to all who participated in this miracle.”

Goodman reported from Bogota, Colombia. Associated Press writers Scott Smith in Caracas, Venezuela, and Brady McCombs in Salt Lake City contributed to this report.