A federal prisoner with a violent past held in the Sherburne County jail assaulted and seriously injured a corrections officer Monday, authorities said.

Hakeem A. Coles, 24, was on a telephone late in the morning along a second-floor jailhouse walkway when he ambushed the officer from behind with a blow to the head, Sheriff Joel Brott said Tuesday.

The 50-year-old officer, who was performing routine duties, fell to the floor, and Coles hit him again in the head "multiple times," Brott said in a statement.

Other officers intervened and detained Coles without further violence.

The officer, a 16-year Sheriff's Office employee, was taken to a hospital with "serious injuries [but] is expected to make a full recovery," said the sheriff, who declined to release the staff member's identity.

In an interview with authorities after the assault, Brott said, Coles said he had no previous contact with the officer he assaulted and explained he had a hatred for all law enforcement.

"That, along with other issues, built up to the point that he was going to assault the next officer he saw, no matter who it was," the sheriff's statement read.

Federal charges in connection with the assault are pending.

Coles, of St. Louis Park, was indicted in federal court in Minneapolis in October in connection with the Aug. 17 armed robbery of Cowboy Jack's, a nightspot in the Warehouse District of downtown Minneapolis. He had just been fired from Cowboy Jack's at the time of the robbery, according to federal prosecutors.

The charges say Coles pulled a short-barreled shotgun from his pants, pumped it and pointed it at the general manager as she pulled money out of the safe. He then ordered the general manager to her knees as she pleaded for her life and explained that recent knee surgery made her unable to obey him.

He tied her up and knocked her unconscious with a punch to the side of her head, the charges continued.

Coles was captured in New Orleans after his arrest in mid-September on charges in Jefferson Parish of illegal weapons possession, having fraudulent identification, illicit drug possession and resisting an officer.

Coles also has a robbery from 2012 on his record and was under supervised probation at the time of the Cowboy Jack's allegation for stabbing, punching and robbing a man in north Minneapolis during a marijuana purchase in February 2018.