Sanjoy Dutta posed for photos moments before the snake struck

A forest ranger posing for a photo with a 30ft python he had just rescued was nearly killed by the serpent's crushing force.

As Sanjoy Dutta posed for the camera with the snake draped across his shoulder, it began tightening its grip, attempting to strangle him in front of a horrified crowd.

The snake had minutes earlier been saved by the ranger and his team from a forest in Jalpaiguri district of West Bengal, India.

Sanjoy began to panic as the python's grip tightened, threatening to cut off circulation to his head.

The crowd quickly turned from cheering to screaming as the reptile's grip tightened

Brief video footage shows the moment the seemingly calm animal turns, wrapping its body around the ranger.

The crowd starts screaming in horror, fearing for the man's life.

He can be seen attempting to loosen the snake's grip while another rescuer pulls at the reptile's tail.

But luckily, Sanjoy escaped unharmed and appeared undeterred by his brush with death, saying "leave it nothing will happen" as he walks away.

Later, the python was released into the forest.

Ravi Kant Sinha, chief wildlife warden of the state, slammed the officer.

He said: "It is not justified. If forest officers do such tricks, who will stop the common people from following them?”

The forest ranger desperately fought the animal off

State Forest Minister Binayakrishna Barman added: "This officer is very enthusiastic. Care should be taken during rescues or he will invite danger."

But eyewitness Manoj Burman said he was happy the snake was removed from the area.

"This was a big snake which was a threat to small children in the nearby school,' he said.

In a scene likened to a horror movie, a 54-year-old woman was eaten alive by a giant python near her home in Southeast Sulawesi last week.

Her lifeless body was later cut from the beast after a search party discovered the huge snake barely able to move with a huge bulge in its belly.