An Indian-origin student in the US took photos of a bear while hiking in a US preserve before it mauled him to death, media reported.

Darsh Patel, a Rutgers University student, and four others were being followed by the black bear in the West Milford Apshawa preserve, New Jersey. But moments after Patel used his mobile phone to capture images of the animal, it attacked and killed him, New York Daily News reported Tuesday.

The five friends had been hiking Sep 21 when they met at the preserve's entrance a man and a woman who advised them to turn around as a bear was on the loose, authorities said.

But the group went on, and Patel took photos from a distance of about 100 feet. Another hiker took one photo.

The group turned and began walking away, but the bear followed, police said. When it got within about 15 feet, the five split up and took off running. Four of them escaped and made a 911 emergency call.

Patel was last seen climbing a rock with the bear close behind. He screamed for the others to keep going. Rescuers found the body two hours later.

It was the first killing by a bear in New Jersey since the 1850s, authorities said.