SAN FRANCISCO (CBS SF) – Police in San Francisco arrested a man with a loaded gun following a confrontation with officers outside a school near the city’s Panhandle earlier this week.

Officers responded to an elementary school near Grove and Cole streets shortly after 4 p.m. Tuesday afternoon on reports of a potentially armed man making threatening gestures and incoherent statements to students and their parents. An eyewitness said the man also tried to enter the school through a side entrance.

When officers arrived, the man denied having weapons. Police said the man then avoided be searched, and had a revolver fall out of his jacket after throwing his backpack at officers.

One of the officers then drew his handgun at the man. Officers then were able to take him into custody without further incident and seize the gun.

The man, identified as 39-year-old Brandon Paillet of San Francisco, was booked into the San Francisco County Jail.

Paillet was booked on multiple charges including possession of a firearm on school grounds, possession of a firearm by a convicted felon, possession of ammunition by a felon, being a prohibited person carrying a loaded firearm and a probation violation.

It was not immediately known when Paillet would appear in court on the charges.