A Baltimore County police tactical officer was fatally shot Wednesday while serving a search warrant at a Catonsville home, according to police.

Jason Schneider, a 13-year veteran of the force who had been with the tactical unit since 2004, and other officers had been going from room to room when he was shot several times, police said. Schneider returned fire and hit a suspect, who was in critical condition at Maryland Shock Trauma Center. The suspect’s name was not immediately released.

“During a well-prepared police event, Officer Schneider was killed in the line of duty and we deeply mourn his loss,” County Executive Kevin Kamenetz said. “I can only tell you that we don’t always appreciate what our police do for us every day, but it’s times like this when we know how grateful we are for their bravery and their sacrifice.”

Police Chief James W. Johnson said Schneider was “a leader within that unit. This is a terrible loss for Baltimore County.”

Schneider, 36, was married and had two children.

Officer 1st Class Jason Schneider poses for a photo in this undated photo released by the Baltimore County Police Department. (AP)

The officers were trying to apprehend a person wanted in an Aug. 19 shooting, in which a man suffered injuries that were not life-threatening. The investigation led police to a home on Roberts Avenue.

Johnson said a county tactical team entered a home on the street at daybreak “after an extensive tactical briefing and much planning.” Schneider and the other officers entered the home, and those inside started to flee, Johnson said. At least one person inside had a handgun.

When Schneider turned a corner in the home, he was shot. “As he was going down, he returns fire, striking the suspect several times,” Johnson said.

Another officer also fired his weapon, the department said in a statement. That officer will be placed on administrative leave pending an investigation.

Gov. Martin O’Malley (D) ordered the state flag flown at half-staff in honor of Schneider.

The last county officer killed by gunfire was in 2000. The last city officer shot by a suspect and killed in the line of duty was in 2007. Officer William Torbit was killed in January 2011 by fellow officers.

Johnson held back tears as he spoke about coping with the loss of an officer. “These things hurt terribly.”

— Baltimore Sun