Fortunately, no one was injured in the gunfire.
Police say the shooting happened around 9 a.m. Wednesday after 59-year-old Robert Carroll got into an argument with the security guard outside School 21 near Madison and 10th avenues.
Police were able to arrest Carroll a few hours later, at 12:37 p.m., near the intersection of 12th Avenue and Rosa Park Boulevard.
Carroll is charged with first-degree attempted murder, unlawful possession of a weapon, and possession of a weapon for an unlawful purpose.
If convicted, Carroll could face more than 20 years behind bars. He's due in court on Thursday afternoon.
ALSO READ | NYPD pulls off daring rescue after scare on Staten Island Ferry
NYPD pulls off a rescue first after man attempted to jump off Staten Island Ferry
----------
* Get Eyewitness News Delivered
* More New Jersey news
* Send us a news tip
* Download the abc7NY app for breaking news alerts
* Follow us on YouTube