A Kenyan found himself in a tight squeeze when a python wrapped him in a coil and dragged him cartoon-style up a tree.

The exhausting struggle between man and snake lasted three hours and only ended when farm worker, Ben Nyaumbe, bit the serpent on the tip of its tail.

"I stepped on a spongy thing on the ground and suddenly my leg was entangled with the body of a huge python," he told the Daily Nation newspaper.

"It waggled its ragged and scary tail on my mouth. I had to bite it as I struggled, one hand incapacitated," he told the paper.

The bite caused the python to momentarily loosen its grip on Mr Nyaumbe’s upper body, after it seized him on Saturday evening, so he could take a mobile phone out of his pocket and ring for back-up.

When his supervisor rushed to his aid with police officers in tow, Mr Nyaumbe smothered the snake's head with his shirt, while the rescuers tied it with a rope and pulled.

"We both came down, landing with a thud," said Mr Nyaumbe, who survived the incident in the Malindi area of Kenyan’s Indian Ocean coast with damaged lips and bruising.

Peter Katam, superintendent of police in Malindi district, said: "Two officers on patrol were called and they found this man was struggling with a snake on a tree.

"The snake had coiled his hands and was trying to swallow him but he struggled very hard. The officers and villagers managed to rescue him and he was freed.

"He himself was injured on the lower lip of the mouth - it was bleeding a little bit - as the tip of the snake's tail was sharp when he said he bit it."

The 13ft (4m) snake was stuffed into three sacks and driven to a bird and snake sanctuary but it later escaped, probably through a gap under the door in the room where it was kept.