New video of an attempted escape by a prisoner riding in the back of a Los Angeles County Sheriff’s Department vehicle shows the moment the inmate managed to slink his way through a window and onto the freeway before being recaptured by a deputy.

The botched escape happened Saturday night on the 5 Freeway near Newhall.

Authorities say the prisoner was being transported to the hospital from the North County Correctional Facility in Castaic.

The unidentified inmate was being taken to the hospital to be treated for an unspecified injury.

But on the way to the hospital, the inmate apparently began kicking the back window, dislodging it and leading to the vehicle having to stop. While stopped, the inmate tried to make his escape through the window but fell face first onto the pavement.

The incident was all captured on video by passengers in a vehicle stopped in traffic behind the sheriff’s squad car.

The inmate was eventually corralled by the deputy, with the help of a good Samaritan, and placed back into the vehicle and restrained.

The hospital transport then continued as planned, LASD officials said.

It’s unclear what charges the man was initially facing, or if he is likely to face additional charges for attempting to escape.