Michael Lee Nivens is charged with attempted first-degree murder and robbery with a dangerous weapon in the attack after school Monday that left the teacher in the hospital, Hoke County Sheriff Hubert Peterkin said.
Nivens was arrested in neighboring Robeson County, but the sheriff did not give additional details.
Nivens entered West Hoke Elementary School near Raeford around 5:45 p.m. Monday through a door that was left unlocked for parents who pick up children from an after-school care program, Peterkin said.
The children were in a different part of the school and did not see the beating, the sheriff said.
Nivens hit the teacher in the head, face and hands with a metal object after asking about a former employee Peterkin said in a statement.
"He did not know the teacher," sheriff's Capt. John Kivett told The Associated Press on Thursday. "It was an act of random violence."
The teacher was taken to the hospital and is recovering, said Peterkin, who would not identify the teacher or the employee who Nivens was looking for.
The sheriff's statement also did not say if Nivens had a lawyer.
Extra officers monitored the school after the attack, Peterkin said.
Nivens was also wanted on a number of charges unrelated to the attack on the teacher, including first-degree rape and larcenies at several churches.
Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.