VISTA, Calif. — Officers chased a stolen semi-truck through three cities in North County Friday night before finally arresting the driver, police said.

It all started in Carlsbad when a license plate reader scanned a passing car and notified officials that its owner reported it stolen, a lieutenant with the city’s police department told FOX 5. Officers caught up to that vehicle and briefly chased the driver, but decided to call off the pursuit for safety reasons.

Authorities eventually found that car abandoned in the area of Paseo Del Norte and Palomar Airport Road, the lieutenant said. Witnesses told officers that a man got out of the car near Avenida Encinas and ran across Interstate 5 into a commercial area. He eventually hopped into a semi-truck and drove off.

Authorities spotted the tractor-trailer around 11:15 p.m. and picked back up the chase. The pursuit wound through Carlsbad, Oceanside and Vista, involving multiple other law enforcement agencies.

The trailer detached from the tractor near El Camino Real, leaving the large, wheeled container sitting in the street. The driver sped on, and it wasn’t initially clear if he lightened the load intentionally or somehow damaged the vehicle.

The truck finally came to a stop in a residential area on Nevada Avenue near North Santa Fe Avenue in Vista. Officers and sheriff’s deputies surrounded the vehicle and called for the man to surrender, which he eventually did without incident, according to Carlsbad Police Department.

Video from News Flash Media showed the man waving his arms and speaking to law enforcement from the cab of the truck before he was arrested. As of Saturday morning, investigators were still looking into how he stole the vehicle in the first place.

No one was hurt in the pursuits.