LOS ANGELES (AP) — A gunman who shot two California police officers, killing one of them, was arrested Saturday after barricading himself in an apartment and holding a SWAT team at bay for more than 15 hours, authorities said.

Police in the city of Pomona tried to stop the man around 9 p.m. Friday after receiving a call about reckless driving, but he refused to pull over and led officers on a pursuit, Los Angeles County sheriff’s officials said. The man crashed during the chase and fled into an apartment complex.

READ MORE: 2 Dead In Dallas After Apparent Murder-Suicide

The officers pursued the suspect, who fired through the door, shooting one of the officers, Los Angeles Sheriff Jim McDonnell said. A second officer tried to rescue his wounded comrade and the suspect fired through the door again, striking the officer in the face, the sheriff said.

Pomona Police Officer Gregory Casillas, 30, of Upland, was killed. The other officer was undergoing surgery Saturday and was expected to recover, officials said.

Gregory Casillas (Pomona Police Department)

“He left his family at home to protect yours and his ultimate sacrifice will never be forgotten,” Pomona Police Chief Michael Olivieri said at a news conference Saturday afternoon.

READ MORE: Dallas County Sheriff's Department Investigating Fatal Pedestrian Accident On I-30

Casillas first joined the police department in Pomona, which is 30 miles east of Los Angeles, as a records specialist in 2014. He then worked as a jailer and became a sworn police officer in September. He leaves behind a wife and two small children.

Gov. Jerry Brown ordered flags at the Capitol to fly at half-staff and said Casillas’ “brave sacrifice will never be forgotten.”

Outside the Los Angeles County coroner’s office, dozens of police cars lined the streets and officers saluted as the slain officer’s body was brought there in a procession Saturday.

The suspect, whose name hasn’t been released, was holed up in the apartment for more than 15 hours as a SWAT team used flash-bang grenades and cameras to watch him and crisis negotiators tried to coax him into coming out peacefully.

The man was taken into custody and led out of the building wearing only his underpants.

MORE NEWS: Relatively Boring Week Ahead Weather-wise, But Could We See A Few Snowflakes?

(© Copyright 2018 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)