A highly venomous cobra made its way into a boy's bedroom and then bit him, at a housing estate in Maha Sarakham province.
Rescuers were called to the house in Kosum Phisai district on Saturday morning.
They were told a snake was in the house and had bitten a 13-year-old boy, identified as Tan.
The boy’s aunt said she was 20 metres away from the house when she heard her mother shouting that her grandson had been bitten by a snake in his bedroom.
A tearful Tan had run out of the room and shut the door, leaving the snake trapped inside.
He had been bitten on the left foot and was rushed to Maha Sarakham hospital by relatives.
The rescuers found a metre-long cobra inside a mosquito net tent the boy slept inside. They quickly captured the snake.
The boy’s mother said the snake visit was totally unexpected because they lived in a housing estate and there was no nearby forest the snake could have come from.
The youngster had spent two days in hospital after receiving treatment for the bite and was gradually recovering, she said.