Andrew Brunson is back on U.S. soil.

After two years of detention in Turkey, during which the American pastor's fate drove a wedge between two longtime allies, a newly-freed Brunson touched down Saturday at Joint Base Andrews just outside Washington, D.C. From there, Brunson plans to stop by the White House for a visit with President Trump.

"They are thankful to be safely home in the USA," Tony Perkins, president of the conservative Family Research Council, tweeted after returning to the country with the pastor and Brunson's wife, Norine. "Under this administration being an American means something!"

Brunson's meeting with Trump promises to offer something of a happy ending to a long story rife with tension and anger.

First arrested in October 2016, the Evangelical Presbyterian minister found himself rounded up — along with tens of thousands of other people — on suspicion of supporting a failed coup attempt just months earlier. Turkish authorities asserted that he had engaged in espionage and aided terrorist groups.

As his time in custody stretched on, his status attracted ire first from U.S. Evangelical leaders, then from the highest rungs of power in Washington. Both President Trump and Vice President Mike Pence actively lobbied for his release, and earlier this year the U.S. slapped several high-ranking Turkish officials with sanctions over his "unfair and unjust detention."

Now, Brunson is free — found guilty by a court in the western city of Izmir, but sentenced to time served and released quickly afterward. And authorities on both sides of the diplomatic dispute are celebrating the ruling, though for different reasons.

Turkish President Recep Tayyip Erdogan and his surrogates have lauded the ruling as proof of the independence of his country's judiciary system. The strongman leader has come under international criticism for fostering an increasingly authoritarian regime and cracking down on dissent within his borders — particularly after the failed coup attempt in 2016.

Addressing Trump on Twitter, Erdogan said Saturday that, "as I've always emphasized, the Turkish judiciary made an impartial decision." Erdogan had previously suggested that Brunson's freedom could depend on whether the U.S. approved his request to extradite Fethullah Gulen, the Islamic cleric whom Erdogan blames for orchestrating the coup attempt.

But on Saturday, Erdogan struck a markedly more conciliatory tone, just an hour after Trump tweeted his thanks to the Turkish president "for his help."

"There was NO DEAL made with Turkey for the release and return of Pastor Andrew Brunson," Trump said. "I don't make deals for hostages."

That claim, however, has been contradicted by multiple media outlets. NBC News and The Washington Post have reported that Brunson's relatively lenient sentence was handed down after secret negotiations between senior officials in Turkey and the Trump administration, conducted on the sidelines of last month's United Nations General Assembly.

Still, Trump expressed his enthusiasm for the opportunity to greet Brunson in person in the Oval Office on Saturday afternoon.

"It will be wonderful to see and meet him," Trump tweeted. "He is a great Christian who has been through such a tough experience."

Copyright 2018 NPR. To see more, visit http://www.npr.org/.