A Kenyan man survived a three-hour struggle with a four-metre python by biting the snake’s tail as it prepared to swallow him whole.

The python had already wrapped its coils around Ben Nyaumbe’s upper body and hauled him up a tree in – but it relinquished its grip in surprisewhen Nyaumbe sunk his teeth into its tail, allowing the farm worker to grab his mobile phone from his pocket and dial for help.

Nyaumbe then used his shirt to smother the snake’s mouth and prevent it swallowing him until police arrived to help him, according to the BBC.

“Two officers on patrol were called and they found this man was struggling with a snake on a tree,” a policeman told the BBC.

“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 snake was captured alive and taken to a sanctuary but later escaped by apparently slithering under a door.

“We are still seriously looking for the snake,” the policeman said. “We want to arrest the snake because any one of us could fall a victim.”