Relatives of James Foley, the American journalist who was killed by Islamic State militants last week, released a heartfelt letter that their son sent them while he was still alive and living in captivity in Syria.

Foley was reporting on the civil war in northern Syria in November 2012 when he was kidnapped by the infamous Iraqi terrorist group known as the Islamic State in Iraq and Syria, or ISIS. After living amongst other captures for almost two years, ISIS released a video of Foley's beheading last Tuesday, reports the New York Daily News.

The militants in the video, titled "A Message to #America (from the #IslamicState)," said the beheading was retribution for recent U.S. airstrikes in Iraq. They also threatened to kill another American journalist who is currently trapped in captivity.

Before his execution, Foley delivered a touching letter thanking his family for all the loving memories that they shared and for their prayers for him. However, because the 40-year-old journalist was not allowed to send letters from his cell, he asked fellow hostage Danish photojournalist Daniel Rye Ottosen, who was about to be released, to commit a letter to memory and deliver it to his family, reports the Daily Mail.

As soon as Ottosen was freed in June, he contacted Foley's mother Diane to deliver his friend's message.

Diane and her husband John Foley decided to release the full letter via the "Free James Foley" Facebook page on Sunday, following a memorial for him in his hometown of Rochester, New Hampshire.

"All letters Jim wrote to his family during his captivity were confiscated by the jailers. So, Jim devised a better approach this last June: he asked a fellow hostage about to be released to commit a letter to memory. Very soon after his release, this hostage called Diane and dictated what follows," reads the Facebook post.

The letter reads as follows:

"Dear Family and Friends,

I remember going to the Mall with Dad, a very long bike ride with Mom. I remember so many great family times that take me away from this prison. Dreams of family and friends take me away and happiness fills my heart.

I know you are thinking of me and praying for me. And I am so thankful. I feel you all especially when I pray. I pray for you to stay strong and to believe. I really feel I can touch you even in this darkness when I pray.

Eighteen of us have been held together in one cell, which has helped me. We have had each other to have endless long conversations about movies, trivia, sports. We have played games made up of scraps found in our cell...we have found ways to play checkers, Chess, and Risk... and have had tournaments of competition, spending some days preparing strategies for the next day's game or lecture. The games and teaching each other have helped the time pass. They have been a huge help. We repeat stories and laugh to break the tension.

I have had weak and strong days. We are so grateful when anyone is freed; but of course, yearn for our own freedom. We try to encourage each other and share strength. We are being fed better now and daily. We have tea, occasional coffee. I have regained most of my weight lost last year.

I think a lot about my brothers and sister. I remember playing Werewolf in the dark with Michael and so many other adventures. I think of chasing Mattie and T around the kitchen counter. It makes me happy to think of them. If there is any money left in my bank account, I want it to go to Michael and Matthew. I am so proud of you, Michael and thankful to you for happy childhood memories and to you and Kristie for happy adult ones.

And big John, how I enjoyed visiting you and Cress in Germany. Thank you for welcoming me. I think a lot about RoRo and try to imagine what Jack is like. I hope he has RoRo's personality!

And Mark... so proud of you too Bro. I think of you on the West coast and hope you are doing some snowboarding and camping, I especially remember us going to the Comedy Club in Boston together and our big hug after. The special moments keep me hopeful.

Katie, so very proud of you. You are the strongest and best of us all!! I think of you working so hard, helping people as a nurse. I am so glad we texted just before I was captured. I pray I can come to your wedding.... now I am sounding like Grammy!!

Grammy, please take your medicine, take walks and keep dancing. I plan to take you out to Margarita's when I get home. Stay strong because I am going to need your help to reclaim my life.

Jim"