A Northern California deputy was killed and a ride-along officer from another county wounded at the scene of an “active shooter incident” early Wednesday, authorities said.

Deputy Brian Ishmael, of the El Dorado County Sheriff’s Office, and the other officer were shot at by an “unknown number of people” near Sand Ridge Road in the unincorporated community of Somerset, the department said in a statement posted just before 7 a.m. local time.

The wounded deputy has since been treated and released from a local hospital.

“It is with an extremely heavy heart that we announce that we lost a deputy in the line of duty this morning,” the statement said.

Two men are in custody, according to the sheriff’s office. Police did not reveal their names or a possible motive.

It wasn’t clear if any deputies fired back, or if any shooters were shot, local outlet ABC 10 reported.

The shooting unfolded in a small rural area, according to the report. Authorities urged residents to stay away and remain vigilant.

Ishmael was a four-year veteran of the sheriff’s office who had previously worked for the Placerville Police Department.

The department shared a video of a procession for the fallen officer later in the morning.