There’s no shortage of Muslim leaders attacking the NYPD for secretly monitoring their communities as part of its strategy to head off new acts of terrorism.

But only one of the critics sits on a city panel as an appointee of Mayor Bloomberg.

Civil-rights lawyer Omar Mohammedi, a member of the city’s Human Rights Commission since 2002, has emerged as a leading spokesman for those demanding that the NYPD back off.

“It’s obviously illegal,” he was quoted as saying last week of the police tactics.

“Targeting people based not on suspicion or probable cause but on their religious practices violates the equal-protection clause under the Constitution. It targets people for who they are and what they stand for . . . That is illegal and immoral.”

The mayor is not only steadfastly defending the Police Department, but is vowing not to be swayed by critics such as Mohammedi.

“It’s not a big thing,” Bloomberg declared. “The New York City Police Department knows their mission.”

Mohammedi serves as president of the Association of Muslim American Lawyers, and has brought lawsuits on behalf of numerous clients who claim their rights were violated by the government, so it’s hardly surprising that he’s speaking out against the NYPD’s tactics.

Still, it makes for an awkward situation.

“It’s rare that a mayoral appointee criticizes another part of the administration, especially the Police Department,” said political consultant George Arzt.

This wasn’t Mohammedi’s first slap at the administration.

Last year, he joined more than a dozen other Muslim and community officials who boycotted Bloomberg’s annual interfaith breakfast to protest what they described as excessive and illegal surveillance by the police.

“Mayor Bloomberg, the extent of these civil-rights violations is astonishing, yet instead of calling for accountability and the rule of law, you have thus far defended the NYPD’s misconduct,” the protesters lectured the mayor.

“We don’t agree with his opinion here, but one of the strengths of this administration is that we rely on people with a diversity of opinions,” said mayoral spokesman Marc LaVorgna.

He added that Mohammedi won’t be asked to resign from his unsalaried post.

A secretary at Mohammedi’s law office said he was traveling and couldn’t be reached to explain why he wants to stay in an administration whose policies he views as “illegal and immoral.”