Updated

A man was arrested Monday after he walked up to a Los Angeles County sheriff's detective outside a fast food restaurant, asked him if he was a law enforcement officer and then stabbed him in the chest, investigators said.

The detective was walking out of a Jack in the Box restaurant in the city of Santa Clarita north of Los Angeles around 10 a.m. when he was approached by a man who asked him if he was a sheriff's deputy, said Capt. Darren Harris, a sheriff's department spokesman. When the detective said yes, the man immediately stabbed him in the chest with a large kitchen knife and then ran off, he said.

The 26-year veteran detective, who investigates sex crimes, was able to make his way back to his car and called for help, Harris said. The knife was found near the scene, authorities said.

After a two-hour manhunt, deputies found Donald Chinchilla, 21, hiding in the backyard of a home a few blocks from the restaurant.

He was arrested on suspicion of attempted murder, Harris said. A telephone number for Chinchilla could not immediately be located in public records.

The detective, who was not identified, was taken to a hospital in good condition and is expected to survive, authorities said.