TAUNTON, Mass. (WPRI) — The man accused of injuring five police officers in Taunton following a pursuit faced a judge on Wednesday.

Douglas Hagerty, 35, has been charged with three counts of assault and battery with a dangerous weapon, two counts of assault with a dangerous weapon, two counts of malicious damage to a motor vehicle, and various others.

A not guilty plea was entered on his behalf and he was ordered held without bail pending a psych evaluation.

Around 6:30 p.m. Tuesday, officers pulled over a driver on Country Street. That driver was cooperative, however, Hagerty pulled up alongside them and began shouting at the officers.

Hagerty eventually sped off and was pulled over a short time later after being spotted driving erratically by another officer, police said.

He initially stopped, but police said he quickly took off and almost hit the officer with his car.

During the pursuit, police said Hagerty drove directly at a marked cruiser and struck another cruiser in the area of Cherry Street.

Hagerty then crashed his car into the side of his relative’s home on West Britannia Street, police said. Officers chased Hagerty into the home where he pulled out a knife and slashed two of them.

Chief Edward Walsh, who lives nearby, then responded to the scene along with other officers. He was also slashed in the torso while trying to disarm Hagerty.

“He came at me lunged at me and at that point I felt an impact on my body. I deployed the Taser, somehow, I mean it was so fast I can’t recount what had happened. I tased him and put him on the ground and we eventually cuffed him,” he recalled.

One officer was seriously hurt with wounds to the neck, face and back. He was taken to the hospital for treatment.

Walsh and four other officers were also taken to the hospital for various knife wounds that were not life-threatening.

His motive is unknown at this time, but Walsh said Hagerty is known to police.