A mother was horrified when she woke to her son's screams and found him in his bed with a python biting his head.

A 6-year-old boy named Tyler was in his family's home in Macksville, Australia, sleeping in the top bunk in his bedroom. His mother, Tammy, was sleeping in her bedroom, when she woke to the sound of her Tyler screaming. She ran into his room and was stunned by what she saw.

Tyler had been bitten by a snake nearly 10-foot-long. The snake slithered into the family's home and into Tyler's bedroom, climbing up to the top bunk.

According to the Daily Mail, the snake bit Tyler's hand before going after his face. He was bit several times before his mother made it into his room.

"It was a terrifying scream and I didn't know what had happened - I certainly didn't think it involved a snake," Tammy told the Guardian. "I have no idea how it even got into the house."

When Tammy entered Tyler's bedroom, the snake was wrapped around his stomach. She pried her son from the snake's grip and pulled him down from the bed.

"I saw his face and the blood and his eyes were still closed so I don't think he was fully awake," she said. "I tried to check him over but he wouldn't let me touch him anywhere."

Tammy rushed Tyler to a nearby hospital and called her cousins to come to the house and get rid of the snake.

The mother says that Tyler doesn't remember anything about the incident.

He was only complaining about his finger hurting. He tapped his head on the way to hospital and he asked me why he was bleeding," Tammy said. "He wouldn't know that a snake had bitten him if we hadn't told him or if people hadn't been talking about it."

Tammy's cousins sent her a photo while she was at the hospital showing one cousin holding the massive python above his head after it had been captured and killed. A Facebook post with the photo, as well as photos of Tyler's injuries, went viral, being shared thousands of times.

According to the Facebook post, Tyler is doing well following the incident.

Steve McEwan, owner of Reptile Word Coffs Harbour, discussed how the snake may have made its way into the Tyler's bed.

"I assume the lights were off and the child was asleep, and being a python he has detected some warmth and slight movement," McEwan told the Guardian News. "They have heat sensors, and they don't think about the size of their prey. If it's hungry it will bite anything, and if it can't eat it, it can't eat it."

He continued, "But I don't believe the snake was going to feast on the child... it's all instinct, not thought processes."