RAEFORD, N.C. -- Sheriff's deputies in North Carolina have arrested a man charged with attacking a teacher at an elementary school in what authorities said was a random act of violence.

Hoke County Sheriff Hubert Peterkin said in a news release that arrest warrants charge Michael Lee Nivens, 34, with attempted first-degree murder and armed robbery in connection with the attack earlier this week. Peterkin says Nivens was arrested in neighboring Robeson County on Thursday, but did not release details. The statement did not indicate if Nivens had a lawyer.

Police previously released photo and surveillance video of the suspect, obtained by CBS affiliate WNCN, and offered a cash reward as they searched for Nivens. Peterkin said Nivens was also wanted for unrelated sexual assault and church thefts.

Peterkin said the teacher was seriously injured when a man entered West Hoke Elementary School near Raeford about 5:45 p.m. Monday.

The man entered through a door that was left unlocked for parents who pick up children from an after-school care program. The sheriff said the man asked the teacher about a former school employee and then hit her in the head, face and hands with a metal object.

"He did not know the teacher," sheriff's Capt. John Kivett said Thursday. "It was an act of random violence."

The victim's name has not been released. Peterkin said she remained in Cape Fear Valley Medical Center in Fayetteville on Wednesday night. Schools spokeswoman Jodie Bryant said the teacher is recovering well.

The after-school program was in another part of the building and no children were in the room where the attack occurred. No other injuries were reported.

"The attack on this teacher, who faithfully serves our Hoke County kids, was senseless and totally unnecessary," Peterkin said. "We are asking the communities to assist law enforcement in locating this suspect before he causes harm to someone else."