An Australian mother woke to the sound of her son’s screams and found a python wrapped around the child’s belly.
Tamara Thurgood struggled to pull the snake off her son after it bit him repeatedly on the face while he slept, relatives said online.
Ms Thurgood told local media it was “like a nightmare” as she fought to free her son.
She said Tyler, 6, had his eyes closed during the ordeal and could not remember being bitten.
Two male relatives who were called to the property at Eungai Rail in northern New South Wales killed the snake.
Snake experts described the encounter with what was probably a 2.5m (8ft) coastal carpet python as an “unfortunate chance meeting”.
Bryan Robinson, a wildlife management specialist for Queensland Fauna Consultancy, told the BBC it was an unusual scenario.
Mr Robinson said snakes usually bite for self-defence, and around 95% of people bitten were either trying to catch or kill the reptile.
“It doesn’t mean the snake was attacking him, the kid could have rolled on him in his sleep,” he said. “Human beings do not fit into the prey selection of any Australian snakes.”
Relatives said Ms Thurgood wanted to share her story online in the hope it would help other families protect their children. She has since asked for privacy.