Police say a man using a BB gun to protect his birds from cats led to an elementary school lockdown in Pennsylvania.

York schools Superintendent Sharon Miller said Tuesday that a report of a gun-wielding man outside Alexander Goode Elementary School came in at 8 a.m.

Officers surrounded the building with about a dozen vehicles. Some students cried as they left school, while parents who had heard rumors waited anxiously.

York Police Capt. Wes Kahley says the man was shooting at cats that were attacking pigeons he raises for a living.

Kahley says the man did not commit a crime, but exercised bad judgment.