Josh Holt, a U.S. citizen who had traveled to Venezuela to marry a woman he met online, was released Saturday after two years in a Caracas jail and has returned to the United States.

Holt, a Utah native, was released along with his wife, Thamy, according to a statement from Sen. Orrin G. Hatch (R-Utah) on Saturday. Holt had been accused by Venezuelan officials of stockpiling weapons and grenades in public housing, a charge that he denies, and his incarceration had become a major flash point in relations between Caracas and Washington.

“Over the last two years I’ve worked with two presidential administrations, countless diplomatic contacts, ambassadors from all over the world, a network of contacts in Venezuela, and President [Nicolás] Maduro himself,” Hatch said in a statement. “I could not be more honored to be able to reunite Josh with his sweet, long-suffering family in Riverton.”

The Holts were reunited with their family in a room at Dulles International Airport at about 7:10 p.m., according to Hatch’s office, which posted a video of the gathering on Twitter. 

President Trump, who announced the release Saturday morning, welcomed Josh and Thamy Holt back to the United States in an impromptu gathering inside the Oval Office, telling them they “came back from a very tough ordeal.”

“You were a tough one, I have to tell you. That was a tough situation,” Trump told Josh Holt, who sat to his right. “But we’ve had 17 [people jailed] released and we’re very proud of that record. Very proud. And we have others coming. We’re in the midst of some very big negotiations to get others out.”

Josh Holt’s parents praised Trump, other administration officials and lawmakers involved in securing the release. Josh Holt said he was “overwhelmed with gratitude” after the “very, very, very difficult two years” he spent in Caracas.

The release comes amid a shaky period in U.S.-Venezuela relations and just days after Maduro won reelection in a vote that has been widely denounced as illegitimate. Senate Foreign Relations Committee Chairman Bob Corker (R-Tenn.) traveled to Caracas on Friday and was shown on state television shaking hands with the president. 

On Saturday, Venezuelan Information Minister Jorge Rodriguez told journalists in Caracas that Holt’s release was the product of “months” of “fruitful meetings” between Maduro and U.S. lawmakers. A day earlier, he described the encounter between Maduro and Corker as “a very good meeting; it is good news for the Venezuelan people.”

Corker said he was “honored to play a small role” in bringing the Holts back to the United States, and Hatch thanked him for his “pivotal efforts,” as well as that of Caleb McCarry, a Corker foreign policy aide who accompanied Corker on the trip. Hatch was officially notified Friday that Holt’s release was being finalized, according to an official familiar with the events, and Corker had kept in close contact with Hatch, who had spoken several times with Maduro about Holt’s situation.

“In the end, Corker was the closer,” the official said.

Analysts suggested Holt’s release was part of a bid to ease the fast-eroding bilateral relations between Washington and Caracas. U.S. financial sanctions have sharply contributed to the Venezuelan economy’s nose dive, and fears have built that the United States — the largest cash buyer of Venezuelan oil — would impose a potentially crippling embargo.

“As part of . . . the peace and reconciliation being presented by President Maduro, he ordered the liberation of the American Joshua Holt and his wife,” Rodriguez said at a Saturday news conference at the presidential palace. He added, “we hope this is read by sectors that permanently promote the attack of Venezuela as a profound intention to seek peace between Venezuelans and the people of the world.”

Holt’s release came as Maduro appears to be on a public relations offensive following the widely condemned elections last week, seeking to make gestures toward his international and domestic critics. On Friday, the government freed 20 political prisoners in the interior state of Zulia. Yet the Venezuelan human rights group Foro Penal called the effort simply part of a new “revolving door policy” in which some prisoners were being released even as others were being detained. One of the directors of the group said at least 14 dissidents had been jailed this past week.

The move additionally comes as Maduro is seeking to boost his legitimacy in the wake of last week’s election, in which he won a new six-year term after a vote condemned internationally as a fraudulent power grab.

Maduro is “trying to see if his isolation can partially be reversed,” said Mariano de Alba, a Venezuelan lawyer specializing in international law. “It’s a measure meant to somehow lower tensions.”

A Mormon missionary from Utah, Holt — called the “Gringo Agent” in Venezuela — became the ultimate example of an American in the wrong place at the wrong time. He was arrested by Venezuelan security forces in June 2016, days after he married Venezuelan resident Thamara Caleño.

Holt was thrown into Venezuela’s notorious Helicoide prison, a compound filled with political prisoners who claim to have been subjected to torture and held without fair trials.

Both Holt and U.S. officials have denied all charges. On May 16, Holt issued dramatic videos from his prison cell following a riot.

His pleas sparked high-level diplomatic maneuvering. Restatements of demands for his release were issued by senior U.S. politicians, and Todd Robinson, then the chief of mission at the U.S. Embassy in Caracas, showed up at Venezuela’s Foreign Affairs Ministry in Caracas to demand information about his safety.

At the time, Venezuelan authorities declined to receive him. On May 22 — two days after Maduro won reelection — Robinson and the U.S. deputy chief of mission, Brian Naranjo, were expelled from the country in a sharp escalation of diplomatic tensions.

Rachelle Krygier in Caracas, Venezuela, contributed to this report.