Police said the python involved in the attack was 13ft (4m) long
A Kenyan man bit a python which wrapped him in its coils and dragged him up a tree during a fierce three-hour struggle, police have told the BBC.
The serpent seized farm worker Ben Nyaumbe in the Malindi area of Kenya's Indian Ocean coast at the weekend.
Mr Nyaumbe bit the snake on the tip of the tail during the exhausting battle in the village of Sabaki.
Police rescued Mr Nyaumbe and captured the 13ft (4m) reptile, before taking it to a sanctuary, but it later escaped.
The victim told police he managed to reach his mobile phone from his pocket to raise the alarm when the python momentarily eased its grip after hauling him up a tree on Saturday evening.
Mr Nyaumbe used his shirt to smother the snake's head and prevent it from swallowing him.
His employer arrived with police and villagers, who tied the python with a rope and pulled them both down from the tree with a thud.
Peter Katam, superintendent of police in Malindi district, told the BBC News website: "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."
Mr Nyaumbe told the Daily Nation newspaper how he resorted to desperate measures after the python, which had apparently been hunting livestock, encircled his upper body in its coils.
"I stepped on a spongy thing on the ground and suddenly my leg was entangled with the body of a huge python," he said.
"I had to bite it."
Supt Katam told the BBC the officers had wanted to shoot the snake but could not do so for fearing of injuring Mr Nyaumbe.
"If it wasn't for the villagers and officers who helped him, he would have been swallowed by the snake over the Easter holiday," said Supt Katam.
He added: "It's very mysterious, this ability to lift the man onto the tree. I've never heard of this before."
The police officer said they took the snake to a sanctuary in Malindi town but it escaped overnight, probably from a gap under the door in the room where it was kept.
"We are still seriously looking for the snake," said Supt Katam. "We want to arrest the snake because any one of us could fall a victim."