A 22-year-old Rutgers University student died after he was attacked and killed by a black bear during a hiking trip in New Jersey over the weekend.

Officials believe that the hiker, identified as Darsh Patel of Edison, was mauled to death on Sunday by a 300-pound male bear that was likely looking for food.

According to the Department of Environmental Protection, this is the first fatal bear attack in New Jersey's history.

Afterwards, sheriff's officers and wildlife officials found the bear circling Patel's body. However, because it would not disperse after officers tried to scare it away, officials were forced to shoot the animal.

Officials will examine the bear at a state lab in an attempt to figure out why it may have pursued Patel and his four friends as they were hiking at the Apshawa Preserve, which is about 45 miles northwest of New York City, said DEP spokesman Larry Ragonese at a news conference, reports The Associated Press.

According to Storbeck, Patel and his four friends ran and split up when they noticed that the bear was following them. However, they couldn't find Patel and called police, who then found his body a couple of hours later.

During a news conference, West Milford police Chief Timothy Storbeck said "this is a rare occurrence" and warned hikers how to react in case they encounter a bear.

"For folks who are out there hiking and looking to enjoy our nature, especially in the fall, we would want to tell them that if you encounter a bear in nature you must remain calm," he said, reports ABC News. "Do not run. You want to make sure the bear has an escape route. You want to avoid direct eye contact with the bear. Back up slowly, speak with a low, assertive voice. Don't panic."