EASTON, Pa.—Officers shot and killed a black bear they said was roaming around the downtown area of the Pennsylvania town of Easton.

Police Capt. Scott Casterline says the officers unsuccessfully tried several times to tranquilize the bear early Sunday and were concerned it would make its way into a residential neighborhood.

Authorities say the bear was spotted twice on Saturday, prompting police to alert the Pennsylvania Game Commission. It was eventually spotted again near the Easton Area Public Library.

Casterline says the bear wasn't an immediate threat to the public but it had become a public safety hazard because it was comfortable in populated areas.

Police say the bear's carcass will be turned over to state wildlife officials.