Obama writes to Abedini, praising him for his 'unyielding faith and courage in the face of great adversity'

Pastor Saeed Abedini shares this copy of President Barack Obama's letter to him.(Facebook/Saeed Abedini)

U.S. President Barack Obama has written a letter to Pastor Saeed Abedini in response to the latter's letter thanking the President for helping him regain his freedom after spending more than three years in an Iranian prison.

"Thank you for taking the time to write to me to express your gratitude. As President, I made a vow that our country would do everything in its power to win your release. I want to personally convey to you how gratified I am that we were finally able to do so," Obama wrote in his letter, which Abedini shared on his Facebook page.

"As you know, I was joined by many of our fellow Americans in praying for your freedom. We all now give thanks that you are home. Many will continue to be inspired by your unyielding faith and courage in the face of great adversity," Obama said.

"Please know I will keep you and your loved ones in my thoughts and prayers," the President wrote.

Abedini described Obama's letter as "inspiring." He then shared a Bible passage about the importance of authority. The Bible verses are from Romans 13:1 and 4. They say: "Let every soul be subject to the governing authorities. For there is no authority except from God, and the authorities that exist are appointed by God. For he is God's minister to you for good."

Meanwhile, Abedini wrote in a separate post that people must emulate God whenever they are going through difficulties in life.

"Let God be God by being in control of your life and your battles. Like a lamb, be silent and don't defend yourself. Do you want God in charge of your life? Then keep silent in front of your offenders," he said. "You are much more like Jesus Christ when you keep [silent] under attack!"