An Indonesian man is recovering in hospital after a bloody fight to the death with a giant python in rural Sumatra.

Security guard Robert Nababan was on patrol at an oil palm plantation in the remote Batang Gansal district of Sumatra island when he came across the near five-meter (25ft) reptile.

READ MORE: Mysterious Hurricane Harvey ‘sea monster’ finally identified (PHOTOS)

When the 37 year old, who reportedly has experience of catching snakes, attempted to lift the creature into a cloth sack, the snake struck, biting him with a force that very nearly severed his arm.

" data-width="500" data-height="281">

Local police chief Sutarja, who like many Indonesians has only only one name, said it was only the quick intervention of another security guard as well as several knife-wielding local residents that prevented Nababan from meeting a grisly end.

“[The python] was unbelievably huge,” Sutarja told AFP.

The villagers’ goodwill did not go unrewarded, however. As Nababan was rushed to hospital, his saviors strung up the beast before dicing, frying and eating its meat.

" data-width="500" data-height="281">

Pictures posted to social media by Risdawaty Nababan, whose relationship to the victim is not yet known, demonstrate the sheer size of the python.

In one image, a child is seen sitting astride the snake’s carcass while, in another, the head and mouth of the snake are splayed open.

" data-width="500" data-height="281">

Giant pythons in parts of Indonesia and the Philippines often reach over 20ft in length.