Auckland trains have been halted after a vehicle drove onto the tracks between the Avondale and New Lynn stations.
The vehicle has driven along the rail line after entering via a nearby crossing, only to get stuck on the tracks after the barrier arms came down, a police statement said.
The driver, who appeared to have suffered a medical event, has been taken to hospital in a moderate condition.
The vehicle was not hit by a train, police said.