A deputy in Rosemead was hospitalized after possibly being exposed to fentanyl during a traffic stop Thursday night.

The incident occurred just before 10 p.m. while two Los Angeles County Sheriff’s Department deputies were conducting a traffic stop at Garvey and Strathmore avenues, officials said.

The deputy was searching the vehicle when he suddenly collapsed.

Officials believe he was exposed to fentanyl, a powerful narcotic, or another unknown substance.

He was transported to a hospital and was in stable condition, officials said.

He was eventually released from the hospital.

Two people in the vehicle were arrested as a result of the encounter.

No further details about the incident have been released.