Alaskan officials killed four bears after they entered a homeless encampment and rummaged through residents’ belongings after city officials had moved them to the campground despite safety concerns.

Some cited the killing of the bears as evidence that the government response to the homeless crisis was ineffective and a failure.

Anchorage officials had shut down the city’s largest homeless encampment on June 30 and sent homeless people to a city-run space called the Centennial Campground. About 210 homeless people live there according to city officials.

The bears were killed by the Alaska Department of Fish and Game.

“Bears entering tents or other structures pose a risk to human safety,” read a statement from Fish and Game. “A bear that is considered a public safety threat, or involved in an attack, may be killed by the Department.”

Anchorage Mayor Dave Bronson defended the decision in a raucous meeting in June.

“You can’t criminalize homelessness, and we agree with that,” said Bronson. “However, once we build a shelter, we provide more living space, more beds than the anticipated number of homeless that we have, then we can do a robust law enforcement for the people that are misbehaving.”

A spokesperson for Bronson told the New York Times that private security personnel were teaching the homeless residents about how to avoid the bears.

“As many longtime Alaskans can attest to, bears do not go to just campgrounds,” said Corey Young. “During the summer, it is common to see them throughout the city in many neighborhoods. The priority will always be to protect humans and mitigate risks to bears.”

He added that 24-hour security was being provided at the campground.

Officials said 12-gauge shotguns were used to kill the bears, which were a sow, an adult male bear, and two cubs.

There are about 1,949 homeless people in Alaska, according to official records.