A officer with Mayor Bill de Blasio's security detail was hit in the back with a BB or pellet on Sunday evening outside of Gracie Mansion, police said. 

De Blasio was not home during the alleged attack, police said. 

RELATED: De Blasio bluntly denies smoking pot at Gracie Mansion 

The officer was hit in the back, treated for minor injuries at Lenox Hill Hospital and released. 

Two people were being questioned, and the NYPD said there have been two recent incidents of pellets hitting windows in the area. 

Sources told the Daily News that an 18-year-old man and 17-year-old girl were being questioned by cops. 

A SWAT team entered nearby 170 East End Avenue, where the shots were apparently fired, and a man was heard yelling “F-- de Blasio,” according to the Daily News. 

There were no arrests on Monday morning, an NYPD spokeswoman told Metro. 

RELATED: Asbestos found in Gracie Mansion roof