PHOENIX (AP) — A video released Thursday by the Maricopa County Sheriff's Office shows an avowed follower of the Islamic State throwing rocks at and wielding a knife toward a sheriff's sergeant before the officer shot his attacker.

Authorities released the body camera video and 911 calls from the Jan. 7 attack outside a sheriff's substation in the suburb of Fountain Hills that led to the arrest of 18-year-old Ismail Hamed on aggravated assault and terrorism charges.

Before the attack in the substation's parking lot, 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.

"I'd like to do something in protest for the people suffering in Palestine and in the Middle East," Hamed told the operator.

Listen to the full 911 audio released by MCSO here. 

The video footage shows Hamed later talking to the sergeant in the parking lot, but the low volume of Hamed's comments made it hard to understand what he was saying.

When the sergeant asked for Hamed's identification, Hamed started throwing rocks at the officer, leading the sergeant to pull out his handgun and point it at the suspect.

Hamed then pulled out a knife and walked toward the sergeant. "I will shoot you," the sergeant said twice.

Hamed ignored the sergeant's warning to drop the knife. Eventually, the sergeant fired at Hamed, causing the suspect to fall to the ground.

You can watch the full body camera video released by MCSO below. 

Hamed, who survived his injuries, has pleaded not guilty to the charges.

Faisal Ullah, an attorney representing Ismail Hamed, didn't immediately return a phone call and email seeking comment on behalf of his client late Thursday afternoon.

The FBI has characterized the encounter between Hamed and the sergeant as a "lone wolf" attack.

Sheriff Paul Penzone said he doesn't think there was an indication that Hamed planned to carry out other attacks. The sheriff didn't know whether Hamed had contacts with bona fide members of the Islamic state.

The video was released after a judge ruled Tuesday that authorities must release records from the investigation after The Associated Press and other news organizations protested an effort by the office of County Attorney Bill Montgomery to keep the videos and other records under seal.