Updated

In a pugnacious defense of what he called a police force bombarded by politics, Mayor Michael Bloomberg lashed out Tuesday at critics of the New York Police Department's stop-and-frisk practice and surveillance programs.

"The NYPD is under attack," the mayor said in a speech that lauded the department for lower crime rates, raised the specter of terrorism and excoriated supporters of legislation that would rein in stop-and-frisk. He also was critical of legal groups that have sued over the practice, mayoral candidates and the media.

"Stop playing politics with public safety. Look at what's happened in Boston. Remember what happened here on 9/11. Remember all of those who have been killed by gun violence and the families they left behind," Bloomberg said. "We owe it to all of them to give our officers all the tools they need to protect innocent lives or people will needlessly die, and we'll all be responsible."

It was a message the mayor has sent before, amid an ongoing federal civil rights trial over stop-and-frisk and City Council hearings on setting new rules for the tactic. He also has repeatedly embraced the NYPD's surveillance and other counterterrorism programs after a series of stories by The Associated Press on the department's widespread spying on Muslims.

But the 22-minute speech and setting -- at police headquarters, in front of a room full of uniformed officials -- telegraphed a stepped-up, aggressive response to those who question whether the nation's largest police department has overstepped its bounds.

Some were quick to push back. Communities United for Police Reform, a coalition of civil rights and community groups backing the proposed legislation, said Bloomberg was engaging in "dangerous scare tactics." One of the measures' sponsors, Councilman Jumaane Williams, termed the speech "a pep rally for his failing proposition that our city has to choose between better policing and safer streets."

Stop-and-frisk -- the practice of stopping, questioning and sometimes patting down people seen as doing something questionable but not necessarily meriting arrest -- has become a flashpoint as the stops rose dramatically in the last decade, to nearly 700,000 in 2011. They dropped to 533,000 last year.

Critics say the stops treat innocent people like criminals and are tainted with racial profiling, noting that more than 80 percent of those approached are black or Hispanic; these groups make up 54 percent of the population. Civil rights and minority advocates and some lawmakers also see the tactic as ineffective because more than 85 percent do not result in arrests or weapons being confiscated.

The mayor has long insisted the stops are based on suspicious behavior, not racial bias, and are a powerful tool for curtailing crime.

The demographics of those stopped reflect not racism but statistics, as a great majority of crime suspects are black or Hispanic, he said Tuesday. And where critics see a dearth of weapons being found, he sees a deterrent.

"There is no doubt that stops are a vitally important reason" why New York has lower rates of major crimes than other big American cities, he said.

The stops have spurred protests, have become a must-address issue for mayoral candidates and have engendered the ongoing federal trial and negotiations propelling the City Council proposals toward a vote.

City Council Speaker Christine Quinn, the Democratic front-runner in the mayor's race, is supporting a measure that would create an inspector general to look at the NYPD's policies and procedures. She said last week she opposed but wouldn't block a vote on a proposal that would make it easier for people to sue over stops they felt reflected racial profiling.

Bloomberg said the lawsuit proposal would "allow New York State judges to micromanage the NYPD" and an inspector general could muddy policy for officers and make other law enforcement agencies reluctant to share information with the NYPD, for fear the inspector might have access to it.

Quinn said in a statement that she felt an inspector general was needed to promote stronger relations between police and citizens.

Bloomberg didn't name names in rapping mayoral candidates for supporting the proposals.

But several responded, either to slap back at Bloomberg or to praise him. While Democratic Public Advocate Bill de Blasio said Bloomberg was "fear-mongering," for instance, Republican and former Metropolitan Transportation Authority chairman Joseph Lhota declared he and the mayor "are on the same page."

Other hopefuls sought middle ground. Adolfo Carrion, a Democrat-turned-unaffiliated former federal housing official running on the Independence Party line, doesn't support the measures. But "the mayor needs to own up to the fact that we can do better," Carrion said by phone, suggesting officers felt undue pressure to make lots of stops.

Bloomberg also lambasted the media, particularly The New York Times, saying the newspaper hasn't done enough to report on gun violence even while editorializing against stop-and-frisk.

Times spokeswoman Danielle Rhoades Ha responded that the newspaper "aggressively covers violence in the city's neighborhoods" and noted that the editorial board is separate from its news coverage.