President Trump welcomed Andrew Brunson to the White House Saturday with jokes and prayers, less than 24 hours after the pastor was freed by Turkey.

Brunson said he and his wife, who spent 25 years in the country, still love the Turkish people and pray for them.

"We pray often for you," Brunson told the president in his first public appearance back in the U.S. after a Turkish court sentenced this week him to more than three years for aiding terrorism. He had been arrested in 2016 and was released for time served.

"Well, I need it more than anybody. That would be very nice. Thank you," said Trump.

[Opinion: Pastor Andrew Brunson's release is a good step, but remain cautious of Turkey]

Kneeling next to the president in the Oval Office, Brunson offered a prayer for Trump to have "supernatural wisdom to accomplish all the plans you have for the country. I ask that you give him wisdom to lead country into righteousness, I ask that you give him perseverance, courage to stand for truth and to protect him from enemies and those undermine."

His wife, Norine, offered her own blessing, after which Trump turned to the couple and lightened the mood.

"Can I ask you a question? Who'd you vote for?" he said. "I knew the answer."

"I would like to say that I sent an absentee ballot from prison," Brunson said.

Brunson declined to discuss how he was treated while detained, saying he wanted to focus on thanking the administration. He said the administration had "fought for us, unusually so, from the time you took office."

Trump said the release was likely to improve relations with Turkey. "We have had a very harsh relationship over the past number of months because of what was happening," he said, calling Brunson's release "a tremendous step toward having the kind of relationship with Turkey which can be a great relationship."