The Chattanooga gunman who killed four U.S. Marines reportedly had a blog about Islam where he expressed his growing devotion.

Mohammad Youssef Abdulazeez attacked military facilities in Tennessee Thursday morning leaving four Marines dead, and one officer wounded. Police killed him in the cross fire of trying to save others.

The 24-year-old wrote two blog posts prior to the shootings where he expressed his growing devotion of Islam, The Daily Beast reports.

In one post, he talked about a fictional prisoner who was told he would be given a test "that would either take him out of his earthly prison -- or send him into a more restrictive environment."

He wrote that the "test" was "this life."

"I would imagine that any sane person would devote their time to mastering the information on the study guide and stay patient with their studies, only giving time for the other things around to keep themselves focused on passing the exam," Abdulazeez wrote.

"They would do this because they know and have been told that they will be rewarded with pleasures that they have never seen," he continued.

In the second post, Abdulazeez talked about Muslims and their understanding of Islam in relation to the tale "Three Blind Men."

President Barack Obama expressed his sympathy for the families of the four Marines that Abdulazeez killed, according to the U.S. Department of Defense.

"It is a heartbreaking circumstance for these individuals who have served our country with great valor to be killed in this fashion," Obama said.

"And I want everybody to understand that we will be thorough and prompt in figuring out exactly what happened," he added

Secretary of Defense Ash Carter also released a statement expressing his sympathy.

"My thoughts and prayers -- along with those of the men and women of the Department of Defense - are with the families of those killed in this senseless act of violence and with all those touched by this tragedy, including our Navy and Marine Corps family," he said.

Officials are completing an ongoing investigation.