A man accused of attacking a worker at a mental hospital in Florida slugged a lawyer in the head during a court appearance on Wednesday, according to reports.

William Green got out of his seat at the Broward County bond court, approached assistant public defender Julie Chase — who was looking down at papers — and delivered the haymaker, which knocked her to the floor.

The sudden attack left everyone in the room in shock, including a large crowd of defendants, video posted by WPLG shows.

“What happened?” Judge Jackie Powell asked after looking up from her desk during the commotion as she prepared to set bond in the unrelated case of a woman who was arrested on stalking and assault charges.

A defendant who was at the podium ran out of the way as bailiffs tackled Green. Powell called a recess in the Broward jail courtroom, where she sets bonds and release conditions, not hear evidence or try the cases.

According to court records, Green, 27, was arrested Tuesday on a battery charge. He was accused of attacking a worker at a mental hospital.

Chase was taken to Broward Health Medical Center.

“I’m doing OK,” she told the news outlet as she left the hospital. The attack “was a bit of a shock,” she added. “I didn’t expect it.”

Gordon Weekes, the executive chief assistant of the Broward County Public Defender’s Office, described Chase as a “very dedicated attorney.”

“This is very unfortunate what happened this morning,” he told the Sun-Sentinel.

“He [Green] seemed to be in a clear psychotic state and he was arrested for battering a [hospital] technician, attacking him from the back,” Weekes added.

He questioned why Green was removed from a facility that could treat any mental health condition he might have.

“There was a big push to have officers trained to deal with crises, trained to identify folks with mental-health illnesses, trained to make better decisions about who they were going to arrest and it seems like going into a hospital to arrest someone who is acting out in a psychotic state, consistent with their psychosis, only seems to transfer the issue to the jail,” he said.

“For our attorney to take the brunt of the failures of law enforcement …is unacceptable.”