BROOKLYN - Outraged Muslims rallied outside police headquarters Wednesday after finding out that the NYPD secretly labeled entire mosques as terrorist organizations, including at least one in Brooklyn.

Designating an entire organization as a terrorist cell means that anyone attending prayer services could be investigated and put under surveillance. Officials say the goal was to allow the police department to use informants to record sermons and send undercover agents into mosques.

Members of the Arab American Association of New York, which is based in Brooklyn, denounced the tactic as deceitful.

An Associated Press investigation found that informants also kept tabs on the Al-Ansar Center in Bensonhurst.