The man accused of shooting a West Texas sheriff's deputy faces an upgraded charge after the lawman died over the weekend.

El Paso Magistrate Judge Penny Hamilton said Monday that 27-year-old Facundo Chavez was rebooked on a capital murder charge. Chavez was initially booked on a count of attempted murder.

The El Paso County Sheriff's Office confirmed Sunday that 35-year-old deputy Peter Herrera died after being shot Friday during a traffic stop.

Authorities say a man in vehicle Herrera stopped fired 15 shots at the deputy after he asked the driver to step out of a car in San Elizario, about 25 miles (40 kilometers) southeast of El Paso.

While officials initially expected him to survive, Herrera's widow said on Facebook his condition worsened Saturday.

Officials say it's the first shooting death of an El Paso deputy since 1940.