A driver was taken into custody following a standoff and pursuit on the 5 Freeway in the Santa Clarita area Thursday morning.

The chase began on the 5 Freeway in Bakersfield after officers saw the driver speeding, California Highway Patrol told KTLA.

The pursuit came to a stop on the southbound side of the freeway in the Santa Clarita area at around 8:17 a.m., but the driver did not immediately exit the vehicle.

CHP then temporarily blocked all southbound and northbound lanes of the freeway as the standoff with the driver continued.

Traffic was seen backed up for miles through the Stevenson Ranch and Santa Clarita areas, aerial video from Sky5 showed.

Around 8:30 a.m., CHP officers walked up to the suspect’s vehicle with shields and took the driver into custody.

CHP began reopening the freeway lanes shortly after that.