A Mississippi deputy was saved by his K-9 officer when he was attacked by three men.

Dep. Todd Frazier was driving on a deserted road during his night shift last week when he noticed a car at a rest stop in Pearlington, Miss., reported ABC.

Frazier stopped, thinking the lone man in the blue Lincoln Town Car needed help, but when he neared the car, two people jumped on him.

"The deputy tripped and fell to the ground as he was backing away from the vehicle," said Glenn Grannan, chief investigator with the Hancock County Sheriff's Office, according to CNN. "That's when all three male subjects, including the driver, ambushed him, cut him on the forehead with a sharp object and dragged him into the woods."

Frazier was able to hit the remote control device around his neck to unlock the backdoor of his patrol car, releasing K-9 Officer Lucas, a black Belgian Malinois. 

The dog bolted toward Frazier and bit one of the suspects. The trio fled in their car and remains on the run.

Frazier suffered knife wounds while Lucas chipped a few teeth and bruised his shoulder.

Motive of the attack is still unclear.