Somerset (US), Oct 24 (AP) A Northern California sheriff's deputy was killed early Wednesday while responding to a call about a theft from a marijuana garden in the rural Sierra Nevada foothills, officials said.

El Dorado County Sheriff's Deputy Brian Ishmael was fatally shot in the community of Somerset and an off-duty deputy from the San Joaquin County Sheriff's Office who riding with him was wounded, authorities said.

The off-duty deputy returned fire and tried to save Ishmael, El Dorado County Sheriff John D'Agostini said. An officer with the California Highway Patrol took the off-duty deputy to a hospital, where he was treated and released.

Two men were detained and a large contingent of law enforcement officers and a helicopter remained at the scene about 72 kilometres east of Sacramento, said a statement from the sheriff's office. D'Agostini said one of the men was shot and taken to the hospital in unknown condition.

A procession of law enforcement vehicles accompanied Ishmael's body Wednesday morning to the Sacramento County coroner's office.

"We lost one of our heroes," D'Agostini said.

The 37-year-old deputy was a four-year veteran of the El Dorado County Sheriff's Office and had worked two years for the Placerville Police Department. He is survived by a wife and three daughters.

"Brian worked in this community and lived in this community," D'Agostini said. "He was personable, easy to talk to, kind and always positive. He never had a bad day."

Governor Gavin Newsom ordered flags at state buildings to be flown at half-staff. He and wife Jennifer "were terribly saddened to learn that Deputy Ishmael was shot and killed this morning while courageously serving and protecting the people of El Dorado County," the governor said in a news release. "Our thoughts and prayers are with his loved ones, friends, and colleagues during this painful time."

Deputy Andrea Lopez from the San Joaquin County Sheriff's Office said the department's deputy, a 28-year-old who has been with the agency for more than two years, was not doing the ride-along for any San Joaquin County purposes. She said authorities believe he had a friend in the El Dorado County Sheriff's Office.

"We don't know why he was there," she said.

Law enforcement often use ride-alongs for community outreach and engagement purposes. In Los Angeles, websites for the city's police department and county sheriff's office both state they accept ride-alongs from community members. Agencies typically require civilians to sign a waiver and complete a background check.

Tab Rhodes, president of the Los Angeles County Professional Peace Officers Association, said ride-alongs allow people "to get an understanding of what an average day in law enforcement looks like." It's also used as a recruitment tool or a prerequisite for potential hires "to give a realistic perspective to something that is often glamorized on TV and movies," he said. (AP)

(This is an unedited and auto-generated story from Syndicated News feed, LatestLY Staff may not have modified or edited the content body)