Evangelical Christian pastor Andrew Brunson, who was released from Turkish imprisonment on Friday, spoke to Sean Hannity on Tuesday night about his detention and his meeting with President Trump.

Brunson, who was at the center of a Turkish-U.S. diplomatic dispute that even had sparked outcry from American evangelical groups, was released to house arrest after almost two years in jail. The pastor, who was accused of terror-related charges, was convicted Friday yet released from custody for time served.

Hannity asked Brunson about his detention, “held in a cell designed for eight, and there were 21 people.”

“It was a very difficult time. I was surprised because I had never considered prison as a possibility and the costs for that,” the pastor replied. “I was isolated by culture and by language but especially by religion. It was very difficult to be the only Christian among them.”

Brunson, originally from Black Mountain, North Carolina, had lived in Turkey with his family for more than two decades and led a small congregation in the Izmir Resurrection Church. He was accused of committing crimes on behalf of Kurdish militants and to aid a Pennsylvania-based Muslim cleric, Fethullah Gulen, accused by Turkey of engineering the failed coup. He faced up to 35 years in jail if convicted of all the charges against him.

He was detained in October 2016, formally arrested that December and placed under house arrest on July 25 for health reasons.

Brunson told Hannity: “What was surprising is that they told me I was being held for terrorism and for trying to overthrow the government. The truth is if we had been preaching Jesus Christ — that’s why we were in Turkey — is to share the gospel of Jesus Christ with Turks. We did that openly, and never had a problem. It was very shocking to be accused of terrorism.”

The pastor said that although he lost a lot of hope in jail, “I began to see there was value in my suffering especially as time went on.”

Through visits from his wife, Norine, he said he received the encouragement he needed to endure, and he was sure God had a plan to end his suffering for him.

SPOTLIGHT TURNS TO NASA SCIENTIST, OTHER AMERICANS JAILED IN TURKEY

Brunson returned to the U.S. aboard a military jet shortly before meeting the president. Trump welcomed Brunson to the White House on Saturday to celebrate the pastor's release.

When Brunson asked Trump if he could pray for him, the president replied, “Well, I need it probably more than anyone else in this room, so that would be very nice, thank you.”

Brunson left his chair beside Trump, kneeled and placed a hand on the president’s shoulder. As Trump bowed his head, Brunson asked God to “give him supernatural wisdom to accomplish all the plans you have for this country and for him. I ask that you give him wisdom in how to lead this country into righteousness.”

JERRY FALWELL JR.: TRUMP PROVES LIBERAL MEDIA WRONG WITH PASTOR BRUNSON RELEASE

He continued: “I ask that you give him perseverance, and endurance and courage to stand for truth. I ask that you to protect him from slander from enemies, from those who would undermine. I ask that you make him a great blessing to this country. Fill him with your wisdom and strength and perseverance. And we bless him. May he be a great blessing to our country. In Jesus’ name, we bless you. Amen.”

Hannity asked about the special moment with the president, and the pastor gave credit to his wife: “My wife, for at some time, wanted to pray some verses over him from Isaiah, just asking for the spirit of God to come upon him.”

Brunson was overcome being able to give devotions to Trump.

He said, “It’s a great privilege, I think many pastors would love to do it. Our president needs prayer.”

The Associated Press contributed to this report.