An Arizona teen pleaded guilty Thursday to murdering a staffer at a southern Utah youth-rehabilitation facility.

Clay Brewer, of Snowflake, Ariz., admitting that he beat to death 61-year-old Jimmy Woolsey with a piece of metal rebar on Dec. 6, 2016. That is a first-degree felony. He also pleaded guilty to second-degree felony aggravated assault for injuring another worker at Turn-About Ranch School.

The now-19-year-old is scheduled to be sentenced Oct. 11.

Brewer was 17 years old when he first came to the ranch, located north of Escalante.

Prosecutors say the teen was sitting around a fire in the early morning with other campers of Turn-About Ranch School when Woolsey approached. Brewer struck Woolsey in the head several times with a piece of rebar. Woolsey was later taken to a hospital where he died.

(Courtesy of Sena Spencer) Jimmy Woolsey and his family.

Following the attack, campers rushed into a nearby cabin where they woke another staffer, Alicia Keller.

Keller held the door closed while Brewer allegedly tried to force his way in, threatening to kill everyone inside. Keller was able to keep him out, but in the process Brewer allegedly beat her hand — smashing her fingers — and hit her over the head.

She then gave Brewer keys to her car to get him to leave. Brewer fled and was apprehended shortly after being chased by Garfield County Sheriff’s Office deputies, according to charges.

In a later police interview, Brewer admitted to killing Woolsey, telling officers he was suffering from drug withdrawals during his five days at the camp and started “freaking out.”

“I just wasn’t in my right mind,” Brewer told police. “I’ve never seen myself like that before.”