Image copyright AP/BBTV CH7 Image caption Attaporn Boonmakchuay prised the snake's jaws open before passing out - but is now making a good recovery

A Thai man is recovering in hospital after a 3m (10ft) python emerged from a squat toilet and sank its teeth into his penis.

Attaporn Boonmakchuay said the python was "yanking very hard" as he and his wife tried to wrestle it off.

Doctors said Mr Attaporn, who lost a lot of blood in the ordeal, was making a good recovery.

Workers dismantled the toilet and extracted the python which had slithered through domestic plumbing.

It was released back into the wild.

The incident happened as Mr Attaporn, 38, went to the toilet at his home in Chachoengsao province, east of Bangkok, before leaving for work on Wednesday.

As he used the toilet he said he suddenly felt a sharp pain.

"I felt as though my penis had been severed. The snake was yanking very hard," he said, according to the Bangkok Post.

Image copyright AP/BBTV CH7 Image caption The snake had worked its way to the toilet through the plumbing

As the python tried to pull him down, he called for his wife and neighbours to help him, the post reported.

Mr Attaporn told Thai TV that his wife tied a rope around the snake and he prised its jaws open before passing out.

Thai media published images of Mr Attaporn's blood-spattered toilet.

Doctors said Mr Attaporn was recovering well.

"He has a really good attitude... even though his own wife and children were in shock. He's been smiling and giving interviews all day from his bed," said Chularat Hospital director Dr Chutima Pincharoen.

Mr Attaporn said he planned to replace the squat toilet with a sitting one.