A prisoner attempted to escape while being transported in Santa Clarita on Saturday night.

The botched getaway happened on the 5 Freeway in the Newhall area just before 5 p.m., according to the Los Angeles County Sheriff’s Department.

The inmate was being transported to a hospital from the North County Correctional Facility for injury treatment.

On their way to the hospital, authorities say the inmate kicked out the patrol car’s window and lunged outside. He tumbled onto the highway while still handcuffed.

Deputies pulled the vehicle over and struggled to gain control of the inmate, officials said. A good Samaritan also stopped to help restrain the prisoner.

After the inmate was secured again, he was placed inside the patrol car and transported to the hospital.