YELLOWSTONE NATIONAL PARK, Wyo. (NEXSTAR) — A judge has sentenced an Illinois woman to four days in jail for not moving away while a grizzly bear with two cubs got dangerously close to her in Yellowstone National Park.

Twenty-five-year-old Samantha R. Dehring of Carol Stream, Illinois, pleaded guilty Wednesday to willfully remaining, approaching and photographing wildlife within 100 yards.

That’s the legal limit for people to approach wolves and bears in Yellowstone, but prosecutors say Dehring kept taking photos as the bear got closer than that May 10.

When the grizzly sow and her two cubs approached the group, witnesses said all of the visitors except for Dehring went back to their cars, according to the Billings Gazette.

The bear eventually bluff-charged, running at Dehring but turning away without attacking. Dehring’s attorney didn’t return a phone message Thursday seeking comment.

“Wildlife in Yellowstone National Park are, indeed, wild. The park is not a zoo where animals can be viewed within the safety of a fenced enclosure. They roam freely in their natural habitat and when threatened will react accordingly,” Acting United States Attorney Bob Murray said in a news release. “Approaching a sow grizzly with cubs is absolutely foolish. Here, pure luck is why Dehring is a criminal defendant and not a mauled tourist.”

On May 25, Yellowstone National Park shared an image of the woman and asked for help identifying her.

Court records stated that a tip from the public led investigators to the woman’s Facebook page, where she posted pictures of the grizzlies with the caption “absolutely floored by the beauty of this place,” the Gazette reports.

Yellowstone National Park officials say there is an average of one bear attack per year in the park and recommend that people never feed or approach the animals and use a car horn to drive them away if they get too close to a vehicle. Hikers and campers should take these steps if they have a close encounter with a bear.

The Associated Press contributed to this report.