There is outrage in Mexico after a black bear seen on video approaching a visitor in a nature park and sniffing her hair was caught and castrated.
Some people are questioning plans to move the animal to a different state.
But experts say the move is necessary because it had become accustomed to being fed by humans in the ecological park where it lived.
They said the footage showed the consequences of feeding wild animals for the sake of a selfie.
The animal, a juvenile male black bear weighing 96kg (212lb), was caught because it was considered to pose a risk to visitors of Chipinque Ecological Park. Video showed it getting very close to a young woman who was taking a selfie with the bear last month.
Officials said there had been other close encounters between humans and the same bear in the park and in residential areas nearby.
Although attacks are rare, one person a year is killed on average by a black bear in North America, bear research scientist Dave Garshelis told ABC News last year.
Wildlife experts remind visitors that bears are wild and dangerous with occasionally unpredictable behaviour.
Locals near Chipinque Ecological Park dubbed the animal “the friendly bear” and called it “Chipi” after the park where it lived.
The bear was captured by officials from the federal environmental protection agency (Profepa) while having a snooze in the backyard of a house after its residents alerted the authorities to their unexpected guest.
Veterinarians at the Autonomous University of Nuevo León checked it over and fitted it with a radio collar.
The animal was also castrated, a move which is now being investigated by Profepa.
The agency has released a statement saying that the decision to castrate the bear was taken by the co-ordinator for wildlife at the university after consulting with Profepa’s director-general for wildlife control, Martín Vargas Prieto.
According to the statement [in Spanish], Mr Vargas Prieto argued that the bear had to be castrated to avoid him getting into fights with other bears once he is released in the Sierra de Nido mountain range in Chihuahua state.
Both the castration and the planned move to Chihuahua have caused outrage among people in the state of Nuevo León, where the bear was captured.
But some have commented on social media that whatever led to the decision to castrate and move the bear, the outrage should be directed at those visitors and guides who are reported to have fed the bear with scraps to make him approach humans who wanted to have selfies taken with him.