A man wanted for attacking a teacher at a North Carolina elementary school was arrested Thursday, three days after the brutal assault.

Cops say Michael Lee Nivens went inside West Hoke Elementary School around 5:45 p.m. on Monday and asked a teacher about a former employee at the school. Nevins then started beating her in the head with an object, according to authorities.

The teacher is recovering from her injuries, and the students remaining at the school at the time of the attack were in a different part of the building.

Authorities described the disturbing incident as an “act of random violence,” according to CBS.

“The attack on this teacher, who faithfully serves our Hoke County kids, was senseless and totally unnecessary,” Hoke County Sheriff Hubert Peterkin said, according to CBS.

Cops had released surveillance video of the suspect earlier this week, and the assailant was identified as Nivens on Wednesday.

Nivens was captured in nearby Robeson County. The 34-year-old suspect has been charged with attempted first-degree murder and robbery with a dangerous weapon.

He was also wanted for unrelated sexual assault and church thefts, according to Peterkin.

With News Wire Services