Two teenagers were taken into police custody Sunday in connection with a pellet-gun attack on New York City Mayor Bill de Blasio's security team officer, authorities said. The shooting happened outside Gracie Mansion, de Blasio’s official residence in Manhattan, around 7:15 p.m.

According to an NYPD spokesman, the female officer was exiting a police vehicle when she "felt pain in the lower back," the Associated Press reported. Authorities believe she was shot with a pellet gun. The officer, who was not identified, was rushed to a nearby hospital for treatment and was later released. De Blasio was in Brooklyn at the time of the incident, according to reports.

The area around the 54-year-old mayor’s house was cordoned off following the shooting, and several streets nearby were blocked, New York Daily News reported. Investigators were trying to gather surveillance video footage to find out more about the shooting.

Police, however, said they were yet to determine if the shooting was accidental or intentional, the New York Times reported. No charges were filed as of Sunday night and investigators were questioning an 18-year-old boy and a 17-year-old girl in connection with the case.

Pellet gun shooting incidents have been reported twice before in the area, causing minor damage, NBC New York reported, citing police.