Black Bear.Photo: Getty

Black Bear (Ursus americanus) walking through rainforest near Gunnuk Creek.

A couple survived a scary encounter with a bear inside their Wisconsin home.

Prior to the attack, they saw the animal outside and eating from a bird feeder, the couple told police, police said. In an attempt to get the bear to leave, they opened a window and yelled at the animal to go away.

However, the bear then “immediately turned and charged at the house, breaking through the window and into the house and immediately attacked,” police said in a news release.

The couple, who both suffered several bites and injuries, were taken to a local hospital but have since been released, police said.

Fortunately, their children were asleep in their bedrooms at the time and were unharmed.

Never miss a story — sign up forPEOPLE’s free weekly newsletterto get the biggest news of the week delivered to your inbox every Friday.

RELATED VIDEO: Girl, 11, Speaks Out After Dad’s Bear Hug Saves Her Life in Airplane Crash

According to the agency, the black bear population in Wisconsin is “considerably higher than it was 30 years ago.”

“Wisconsin’s occupied bear range is expanding, which means residents can expect to see black bears in areas outside of the bear’s traditional range,” the agency said on theirwebsite.

“Wisconsin’s bear population was estimated to be about 9,000 bears in 1989. The most recent data indicates the bear population is currently estimated to be a little over 24,000 bears,” they added.

The Wisconsin Department of Natural Resources said that although “black bears arenormally shy animalsand try to avoid humans,” they can become “defensive when protecting its young or a food source.”

In the event a black bear becomes aggressive, the agency recommended that individuals “talk to the bear or start shouting if it doesn’t leave,” and then raise their arms above their head, waving them “to appear larger than you are.”

They also advised that it’s important to never run or turn your back on a black bear and to “fight back if attacked.”

In terms of bird feeders, the agency said it’s safest to only put them out in the winter when bears are in their dens — and that in the warmer months, they should be “brought in at night and made inaccessible to bears.”

source: people.com