Police tried to chase the bruin away from the Dennis O'Brien Elementary School.
But the bear climbed a tree in a wooded area between the school and a field. It stayed there for about six hours.
Police considered the bear a threat to children and wildlife officials agreed to euthanize it.
State officials say bears started breeding this month and male bears roam long distances in search of mates.