In California, it’s illegal to shoot a black bear because they’re considered a game mammal and require permission to kill. However, in Thursday’s shooting, the citizen who was attacked said it was a case of self-defense and police agreed.

The El Dorado County Sheriff’s Office received reports on Thursday night of a bear that threatened a residence in Meyers, a small community about six miles south of South Lake Tahoe. The man who reported the attack said the bear entered the home and attacked him. He noted that the bear’s actions required him to shoot the bear with a firearm “out of self-defense.”

Sergeant Eric Palmberg told Newsweek the people who reported the attack were renting the house and came home from an evening out to find the bear inside the home. Two people encountered the bear, although Palmberg was unsure if there were others in the home at the time.

An investigation into the incident yielded no indication of any criminal wrongdoing, according to the El Dorado County Sheriff’s Office.

After being shot, the bear ran out of the home, bleeding, according to the person who reported the attack. When deputies arrived on the scene, they were unable to locate the injured animal and reported it to the California Department of Fish and Wildlife.

The next morning, the agency located the “gravely wounded” bear and euthanized it.

The brute strength of a black bear allows it to take a door off its hinges if it can fit its claw into the gap between the frame and the door, according to the California Department of Fish and Wildlife. While hunting black bears requires a permit and is restricted to a specific season, if a bear is injuring livestock or enters a cabin or home, the agency can issue a depredation permit, meaning a homeowner or tenant has the ability to kill the bear.

It’s not the first time a California homeowner has claimed self-defense in the shooting of a bear, however, a previous case was not as clear cut. In 2015, a man who turned down a permit to legally shoot a bear that was causing damage to his property told authorities he shot the bear after he came home and found it in his garage, USA Today reported.

Bear advocates questioned the man’s story, in part because of the wounds found to the bear’s rear, indicating the animal was shot from behind.

BearWise, an agency dedicated to providing the public with information about black bears, attributed the uptick in bear sightings to two reasons. The first is that the pandemic fueled an exodus from cities to suburban areas, putting more people in bear country than previous years, and the second is that the increase in technology, including video security systems, makes it capable for people to capture more bear sightings.

Despite the increased number of sightings, BearWise noted that black bear attacks remain “very uncommon” because the animals “rarely become aggressive when encountered.” Still, the El Dorado County Sheriff’s Office advised residents to become familiar with safety tips for bear encounters, including what to do if a person finds themselves face-to-face with an animal.

Contrary to popular myth, it is not advisable to “play dead,” if a person is attacked by a bear, according to BearWise. Instead, the website advises people to “fight back” with anything they have, including their ability to kick the bear or use a knife, stick or rock.