A Texas state trooper died Saturday — almost five months after he was shot while responding to a car crash earlier this year.

Trooper Moises Sanchez, 49, was struck around April 6 in Edinburg, in Hidalgo County, officials said. He had approached a two-vehicle collision to investigate around 8:45 p.m. when a driver of one of the vehicles, identified as Victor Alejandro Godinez, fled the scene and allegedly shot Sanchez.

LA SHERIFF'S DEPUTY 'COMPLETELY FABRICATED' SNIPER STORY, HAS BEEN FIRED, AUTHORITIES SAY

Godinez was initially charged with three counts of attempted capital murder of a peace officer, but will now face a capital murder charge following Sanchez's death.

Sanchez, who was stationed in Palmview, "demonstrated great strength and bravery as a Texas trooper," according to Texas Department of Public Safety Director Steven McCraw. "We will honor his selfless service and sacrifice forever."

The trooper's rehabilitation was detailed in Facebook posts by the state's Department of Public Safety. In June, he was transported to a rehab center in Houston. Officials wrote at the time that Sanchez was stable "and not being supported by any artificial or mechanical means other than a feeding tube to his stomach, [but] he does not respond to commands."

CLICK HERE TO GET THE FOX NEWS APP

"He cannot sit or stand unassisted," officials continued. "He has been able to take some steps with the assistance of the mechanical exoskeleton."

The director said Sanchez leaves behind a wife and three children.