Security guards at York Hospital had to call for back-up to catch an unwanted visitor in the car park - a 4ft (120cm) long, bright orange corn snake.
The corn snake had made itself comfortable under the car's bonnet
The reptile was seen slithering between the vehicles before settling under the bonnet of a pregnant woman's car.
Guards surrounded the car and got the owner of a nearby pet shop, Andrew Mercer, to retrieve the reptile.
Mr Mercer said the female snake was not venomous and was most likely to be an escaped pet as it was in good health.
The owner of the Leaping Lizards reptile store said the owner of the car was shocked when she got back to find it surrounded by security guards.
"She stood back for a second and handed the keys over to us to unlock the car and pop the bonnet, but considering the lady was pregnant I think it was a good job that she didn't have it there and then," he said.
North American corn snakes are popular pets as they are easy to care for but they are also good at escaping, he added.
"It's probably a pet snake that's escaped when the owners have left the door open or it's pushed the lid off its tank.
"The weather here at the moment is very characteristic of the areas it comes from in North America so it could live quite happily at the moment without any ill effects."