A young lion that had been captured after being on the run for almost a month spent the night in a South African police cell before being moved back to its national park home.

The juvenile male apparently escaped from the Karoo National Park through a hole in a perimeter fence. He was eventually tracked and darted on Wednesday before being moved by helicopter to the Sutherland police station where he ended up alone in a holding cell.

"I am sure this is the first time in the world that a lion is put in jail," said police station commander Capt. Marius Malan.

He said the jail luckily had no human guests on Wednesday night.

Curious residents of the village of Sutherland, known more for one of the Southern Hemisphere's largest optical telescopes, thronged outside the police station to catch a glimpse of the locked-up lion.

"He is safe and healthy. We didn't give him breakfast because he had enough to eat along the road," Malan said.

Malan said the lion, believed to be 2 years old, would be darted again before being transported back to his natural habitat at the Karoo National Park, a hilly region of grassy scrubland about halfway between Cape Town and Johannesburg.