A Lubbock County sheriff's deputy was left dangling headfirst from an overpass Monday after a semitruck rear-ended two patrol vehicles the deputies had used to block a lane while assisting motorists, authorities said.

The crash occurred just after 9:15 a.m. near the Highway 87 and 98th Street overpass, Sheriff Kelly Rowe said at a Tuesday news briefing. Deputies Andrew Cavasos, 49, and Jorge Martinez, 36, had returned from an unrelated call and stopped to help a motorist who was changing a tire. They positioned patrol vehicles to divert traffic and protect the scene when the 18-wheeler struck the parked units, pushing one vehicle against a concrete barrier and pinning the two deputies.

Video released by local outlets shows Cavasos partially pushed over the side of the overpass and hanging by his feet while his patrol unit pressed him against the wall. Good Samaritans from a nearby gas station raced to the scene, one bringing a ladder while others grasped Cavasos by his legs and shirt. The bystanders were able to lift Cavasos back onto the overpass before emergency crews completed the rescue, the sheriff said.

Both deputies were transported to a local hospital for treatment and later released to recover at home, Rowe said. The driver of the semitruck, identified by authorities as 57-year-old Gregory Vaught, also suffered moderate injuries and was taken to University Medical Center; he has since been released.

Rowe credited the quick action of civilians with likely saving lives. "God is great," the sheriff said at the news conference. "He certainly was watching out for two young men yesterday, absolutely no doubt in my mind." He thanked the citizens who intervened and described their response as emblematic of the community.

Martinez, who joined the sheriff's office in 2015, told the sheriff's office he was grateful for the help. "Thank you for helping my partner when I couldn't reach him," Martinez said, according to Rowe. Cavasos, a member of the sheriff's office since 2009, said, "It could have gone a lot different without you there."

A preliminary investigation by the Lubbock Police Department and the Texas Department of Public Safety found that the semitruck driver was distracted while attempting to reconnect a Bluetooth device when he failed to look up in time and rear-ended both sheriff's vehicles, Rowe said. Authorities said they have not filed criminal charges as the investigation continues.

Officials described the deputies' decision to stop and block the outside lane as a safety measure to protect two people who were changing a tire on the overpass. The collision pushed the patrol vehicle toward the deputies and pinned them against the concrete barrier, creating the dangerous situation captured on video.

Local news stations posted footage of the rescue; KCBD filmed Good Samaritans carrying a ladder and pulling on the deputy until he could be brought back over the barrier. Fox 4 reported that the patrol vehicle was the only thing preventing Cavasos from falling from the overpass.

Rowe said he hoped to personally thank those who helped, and he praised the public's willingness to intervene. "Part of the beauty of living in Lubbock, Texas is we know what our citizens are capable of," he said. "We know what kind of people they are — and that's just embedded in their DNA to see something like that happening and be willing to jump in and provide assistance."

The Lubbock Police Department and the Texas Department of Public Safety are leading the crash investigation to determine the sequence of events and whether any further action is warranted. Authorities have not released additional details about the truck's ownership, the condition of the vehicle involved, or whether any traffic citations will be issued.

The episode has prompted renewed attention to traffic safety, the risks faced by law enforcement officers working roadside incidents, and the role of distracted driving in serious collisions. Federal and state agencies have long identified distracted driving, including the use of mobile devices and in-vehicle technology, as a factor in crashes involving large commercial vehicles and passenger cars.

No one at the sheriff's office provided a timeline for concluding the investigation or for any potential administrative reviews related to the deputies' roadside procedures. Sheriff Rowe said his office would continue coordinating with state investigators and expressed gratitude to emergency personnel, firefighters and the civilians who assisted at the scene.