A black bear was euthanized after wandering around a Montana neighborhood for about an hour, police said.

The bear was first spotted around 4 a.m. Thursday near a Billings post office, The Billings Gazette reported. The bear traveled about one mile and passed through multiple neighborhoods.

At 5:10 a.m., the bear climbed a tree, and police shot and killed it, according to a tweet from the Billings Police Department.

The bear was male and weighed about 150 pounds, which is consistent with a young adult bear, said Bob Gibson of Montana Fish, Wildlife and Parks.

Authorities decided to kill the bear because they believe it had become accustomed to humans, Gibson said. FWP officials have previously relocated bears back to the mountains, but the bears eventually find their way back, he said.

"When kids get up and ready to go to school, and people start getting up and going to work and things, those are the kinds of places you just don't want a bear in a densely populated urban area," Gibson said.