American pastor Andrew Brunson, who was released from a prison in Turkey on Friday, on Saturday met President Donald Trump and thanked him for the administration's work to free him.

The President introduced Brunson and praised his resilience throughout the two years he spent in jail.

"I just want to congratulate you because you have galvanized this country," Trump said, according to CNN. "There's so much interest, and it's your faith, it's your strength, what you've done, gone through."

Trump also thanked Turkish President Recep Tayyip Erdogan for facilitating Brunson's return.

"I do want to thank President Erdogan for making this possible," Trump said. "It wasn't easy, it wasn't easy for him."

After introducing his family, Brunson thanked Trump for working to negotiate his release "from the time you took office."

"We especially want to thank the administration, they really fought for us, unusually so," Brunson said, addressing the President. "From the time you took office, I know that you've been engaged."

Brunson also thanked Secretary of State Mike Pompeo, Vice President Mike Pence, and Sens. Thom Thillis of North Carolina, Jeanne Shaheen of New Hampshire, Lindsey Graham of South Carolina and James Lankford of Oklahoma.

Brunson then prayed aloud for the President, asking that Trump be blessed with "supernatural wisdom" and "courage to stand for truth" and that he be protected "from slander from enemies and those who would undermine him."

"Thank you very much. Can I ask you one question?" Trump said after the blessing. "Who did you vote for?"

The group laughed, and the pastor assured Trump that he sent in an absentee ballot from Turkey voting for him.

The detention of the pastor, who was accused by Turkey of aiding terrorist groups, had been an ongoing source of tension between the US and Turkey.

Trump recently imposed sanctions on several Turkish officials and a 20 percent duty on aluminum and a 50 percent duty on steel in response to the continued imprisonment of Brunson.

In response, Turkey imposed tariffs on certain imports from the United States.

Trump recently told Reuters in an interview that he would not make any concessions to Turkey to gain Brunson’s freedom, adding he was not concerned that retaliatory tariffs he imposed will have a ripple effect and hurt the European economy.

In response, Erdogan accused Washington of making “unlawful requests” regarding the pastor.

Brunson was released Friday after being detained in Turkey for two years. A Turkish court sentenced the pastor to three years and one month in prison but chose to release him based on his time already served as well as his manner during the proceedings.

There had been rumors that Brunson would be released after a secret deal was reached between the sides, but Trump denied that a deal had been in place.

“There was NO DEAL made with Turkey for the release and return of Pastor Andrew Brunson. I don’t make deals for hostages. There was, however, great appreciation on behalf of the United States, which will lead to good, perhaps great, relations between the United States & Turkey!” he tweeted on Saturday.