This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

A California Highway Patrol chase and standoff ended when a driver who had held a gun to his head was recently attacked by a K-9 in a moment caught on dramatic video in front of KTLA sister station KTXL’s Sacramento studio.

The pursuit began Thursday evening when the motorist refused to yield for a routine traffic violation stop, leading to a high-speed chase, KTXL reported.

Authorities spiked the man’s tires and he came to a halt around 9 p.m. at Fruitridge Road and Lawrence Drive, right in front of the Fox affiliate’s south Sacramento newsroom.

The man stayed in his sedan there for more than an hour, talking to authorities and holding a gun to his head, CHP told KTXL. Authorities said they learned from family that the man had mental health problems.

He appeared to be drinking, smoking and at one point was beating himself on the head, video from the confrontation showed. CHP and Sacramento County Sheriff’s Department SWAT team responded.

When the man got out of the car, authorities could be heard speaking to him on a megaphone as other witnesses yelled in the background.

“Cory, put the gun down. Talk to me. This is not how you want this to go,” the voice said. “Put your hands up in the air. … We don’t want you hurt, just get down on the ground.”

As the man tossed the handgun away onto the roof of the car and put his hands into the air, a police dog leapt up onto his chest and knocked him down, and then one officer came the man’s side on the ground, KTXL’s video showed.

The man could be heard saying, “Get him off, get him off,” as several other armed officers rushed toward him.

A CHP spokesman said the driver suffered dog bites, and video showed him being treated by paramedics. He had refused to obey commands after throwing the gun away, authorities told KTXL.

“CHP officers and responding agencies that assisted used great judgment and patience,” CHP Officer Michael Bradley told the Sacramento Bee on Friday. “Officers used extreme caution and restraint in not having to fire any rounds to take him into custody.”