FILE - This undated file photo provided by the Maricopa County Sheriff's Office shows Ismail Hamed, who authorities say was shot by a sheriff's sergeant earlier this year after Hamed threw rocks at and wielded a knife toward the officer. Records released by investigators say Hamed, who pledged his allegiance to the Islamic State before attacking the officer, had used text messages in the proceeding months to spread terror propaganda among his friends. Hamed, who survived the shooting, has pleaded not guilty to aggravated assault and terrorism charges stemming from the Jan. 7 attack. (Maricopa County Sheriff's Office via AP, File)

PHOENIX (AP) — An 18-year-old Islamic State follower who was shot after throwing rocks at and wielding a knife toward a police officer in metro Phoenix earlier this year had used text messages to spread terror propaganda to a friend, according to documents released by authorities.

Ismail Hamed sent a friend links to al-Qaida leader Osama bin Laden's declaration of jihad, a video of U.S.-born militant cleric Anwar al-Awlaki and texted a photo of the gunman in the 2016 Florida nightclub massacre with a message saying, "Never forget Orlando."

In other texts, he alluded to the Columbine High School shooting in 1999, bemoaned the effect of Western secularism on Islam and said he had read accounts of prisoners jailed at the Guantanamo Bay detention center, according to records from the investigation released on June 14 at the request of prosecutors.

Investigators say Hamed was gradually embracing extremist ideologies in the four months before the Jan. 7 attack outside a sheriff's substation in Fountain Hills, which is 30 miles (48 kilometers) northeast of Phoenix.

Three weeks before the attack, Hamed texted a friend that the afterlife was all that mattered and that he didn't need anyone but Allah to survive.

On the day of the attack, Hamed told a 911 operator that he pledged allegiance to the Islamic State, was armed with rocks and a knife, and wanted to meet face-to-face with an officer. He told the operator that he wanted to protest suffering in the Middle East.

Body-camera video of the encounter shows that when a sheriff's sergeant asked for Hamed's identification, Hamed started throwing rocks at him, leading the officer to pull out his handgun and point it at Hamed, who then drew a knife and walked toward the sergeant.

The officer shot Hamed, who survived his injuries, after Hamed ignored a warning to drop the knife.

Hamed, who at the time was a high school student on winter break, has pleaded not guilty to aggravated assault and terrorism charges. He has been jailed since his arrest.

Mark Mendoza, one of Hamed's attorneys, declined to comment on the records.

The Maricopa County Sheriff's Office, which investigated the case, told The Associated Press that Hamed didn't have any contacts with recruiters for terrorist groups and instead was self-racialized through his research of the Islamic State and radical groups.

He sent the texts to his high school friends, but Hamed is the only person among the group of friends who planned to carry out an attack and was believed to be a bona fide sympathizer of the Islamic State, the sheriff's office said.

In a Sept. 21 text, Hamed asked a friend if he had read the declaration of jihad by bin Laden, the chief suspect in the 2001 attacks on the United States who was killed by Navy SEALs in Pakistan nearly a decade later, according to the records.

"not yet, been busy with schoolwork, i will make time to read it this weekend," the friend responded.

Two weeks before attacking the sheriff's sergeant, Hamed sent the same friend a link to a video featuring al-Awlaki, who was considered an inspirational leader of al-Qaida before he was killed in a drone strike in Yemen in 2011.

Hamed texted his friend that the video was "an eye opener" and that he considered al-Awlaki to be "one of the best scholars of our time," according to the records.

The same friend also received a Dec. 21 text from Hamed, who wrote "Never forget Orlando" and posted a photo of Omar Mateen, who killed 49 people at the Orlando nightclub in 2016 and was killed by police after opening fire in the name of the Islamic State.

In a September text to three friends, Hamed said he was about to turn 18, with one friend responding, "What are you going to do with all that power?" Hamed responded by saying "the spirit of columbine is within me."

He told a friend in a text in September that he hoped Islam didn't fall victim to Western secularism. "For example at my mosque we allowed non muslim women to enter in the mosque without a hijab just so we could give them the impression that we are a 'peace loving' faith," Hamed wrote.

Even though Hamed would later invoke the Islamic State before throwing rocks at the officer, he criticized the terror group twice in texts in the preceding months, saying it wasn't fighting a noble jihad and calling it an asset of the Central Intelligence Agency.

___

Follow Jacques Billeaud at twitter.com/jacquesbilleaud.

FILE - This undated file photo provided by the Maricopa County Sheriff's Office shows Ismail Hamed, who authorities say was shot by a sheriff's sergeant earlier this year after Hamed threw rocks at and wielded a knife toward the officer. Records released by investigators say Hamed, who pledged his allegiance to the Islamic State before attacking the officer, had used text messages in the proceeding months to spread terror propaganda among his friends. Hamed, who survived the shooting, has pleaded not guilty to aggravated assault and terrorism charges stemming from the Jan. 7 attack. (Maricopa County Sheriff's Office via AP, File)