Image caption The prisoners commandeered a van operated by Prisoner Transportation Services

Eight inmates escaped from a prison van in the US state of Oklahoma when their guards stopped at a hospital and left the keys inside the still-running vehicle, authorities have said.

The inmates were being moved from jails by a private prison company on Tuesday when at least one fell ill.

The prisoners kicked out a partition inside the van and drove away.

Police rounded up six of them soon after the escape and apprehended the remaining two by Tuesday evening.

The eight inmates had been left in a locked compartment inside the van when the guards, employed by Prisoner Transportation Services, stopped at a hospital near the town of Weatherford, an hour west of Oklahoma City, according to local media reports.

They left the keys in the van's ignition while they sought treatment for at least one sick prisoner.

The stolen van was recovered about a mile away.

Six of the inmates were quickly captured.

Authorities summoned dogs and helicopters to search for the two inmates who had fled the scene.

"We're going door-to-door and searching every residence that we can," Louis Flowers, assistant to the Weatherford police chief, told reporters.

Nearby Southwestern Oklahoma State University was locked down for several hours on Tuesday afternoon while police searched for the inmates, but has since reopened.

By Tuesday evening, the remaining two inmates had been recaptured, police said.

Information about the inmates' crimes was unavailable.