ODESSA, Texas (AP) — An Odessa man has been sentenced to life in prison after an Ector County jury convicted him of attempted capital murder in the 2015 shooting of two police officers at an apartment complex.

The Ector County jury found Roy Daniel Garza guilty Friday of two counts of attempted capital murder and he was sentenced shortly afterward.

An Odessa police sergeant was shot in the arm and an officer suffered wounds to the chest and leg during a nine-hour standoff. Both men were hospitalized in fair condition.

Garza shot at a group of law enforcement personnel as he was being served a warrant from Williamson County for aggravated robbery.

He eventually surrendered after gas canisters were fired into his apartment and an armored police vehicle was used to break a wall.