A man was sentenced to 60 years in prison on Tuesday after pleading guilty in the 2018 fatal shooting of a Fort Worth police officer, prosecutors said.

Samuel Mayfield, 37, pleaded guilty to a murder charge in the slaying of Garrett Hull, an officer who was promoted to corporal after his death. Mayfield didn’t shoot Hull, but he was one of three men officers were pursuing after a robbery at a bar when Hull was killed, Tarrant County prosecutors said.

Also Read | Billie Eilish requests restraining order against Christopher Anderson, alleged home invader

Police said that Mayfield, Timothy Huff and Dacion Steptoe were confronted by Hull and a team of undercover and uniformed officers after the trio robbed a Fort Worth bar. The three men ran in different directions when they saw the officers.

Steptoe opened fire, killing Hull, prosecutors said. Then another officer fatally shot Steptoe.

Mayfield and Huff were arrested and charged in Hull’s death, prosecutors said. Prosecutors said that Texas law allows a person to be criminally responsible for the actions of someone else if there’s a conspiracy to commit one crime and another felony occurs.

Also Read | Meryl Streep cast in Only Murders in The Building season 3

Huff was found guilty of capital murder last year and sentenced to life in prison without parole.