A woman got the "fright of her life" when she woke to find she was sharing her bed with a 3ft (90cm) long snake.
The royal python, which is thought to be an escaped pet, had curled up next to her as she slept in her flat in Kensington, west London, on Monday.
The woman rushed out of her room and called the RSPCA but the snake slithered away before they arrived.
The harmless reptile was finally captured in the flat on Tuesday evening by officer Jill Sanders.
She said: "The poor resident must have had the fright of their life waking up to a snake in their bed."
The RSPCA said it did not know how it got into the flat but believe it belongs to someone living nearby.
"Reptiles, particularly snakes, can be extremely good escape artists and will take the opportunity of a gap in an enclosure door, or a loose-fitting lid," Ms Sanders added.
Originate from West Africa, from countries including the republics of Ghana, Togo and Benin
Grow to up to 150cm (4ft 9ins) and can live more than 20 years in captivity
Typically "docile" in nature, and curl into a ball when threatened
Require a diet of defrosted mice and rats