A huge crocodile attacked a man and ripped off his leg while he was crossing a canal in India's Uttar Pradesh on Saturday.

The reptile caught the man, identified only by his first name Eshwardin, while he was crossing the Sharda river canal near a forest range in the northern Indian state. The crocodile tried to drag him into the water, the Times of India reported.

Some farmers who were working near the canal rushed to the area after hearing his screams. They pelted stones at the crocodile. After a 15-minute-long struggle, the reptile released the man from its grasp but ripped off his leg. Eshwardin lost consciousness and suffered excessive blood loss. He was rushed to a hospital. His condition remains critical.

"The sight was terrifying as a giant mugger over three meters long [10-foot-long] had Eshardeen's leg between his jaws and was trying to drag him into the water. The crocodile didn't let go of our man till we battered it with batons," Harkesh, a local resident, told the Times of India.

Following the incident, forest officials warned people to be very careful while crossing canals or rivers.

"The victim is undergoing treatment at the hospital. It is a natural canal of river Sharda that passes through forest. We are taking care of Eshwardeen's treatment. He will be eligible for compensation of up to Rs 2 lakh ($2,675 )in case of permanent disability. The locals have been warned to exercise extreme caution when near the river or the canals, especially during the monsoon when there is heavy flow of water," Anil Patel, divisional forest officer, told the outlet.

At least our people have been killed by crocodiles in the region in the past two months, Daiji World reported.

Earlier this month, a 15-year-old boy was attacked and killed by a crocodile while he was bathing his buffalo in a river in the same state. Rescuers later retrieved the teenager's half-eaten body from the Khakhra river.

"After discussing with the district magistrate, we have decided to identify the areas near human habitat where there is a presence of crocodiles and will put up signboards there to keep people away. Forest department will also launch an awareness campaign to prevent such incidents," Kirit Kumar Rathod, a senior police officer, said at the time.

crocodile
This photo shows a crocodile at 'El Tronador' Wildlife Rescue Center in Berlin, Feb. 20, 2017. Getty Images/Marvin Recinos