President Barack Obama's remark on Wednesday that police acted stupidly in arresting Harvard professor angered police force nationwide.

The President has alienated public safety officers across the country by his comments, said David Holway, president of the International Brotherhood of Police Officers, which represents 15,000 public security officials.

You not only used poor judgment in your choice of words, you indicted all members of the Cambridge police department and public safety officers across the country, he wrote in a letter to Obama, demanding an apology.

Gates, 58, director of Harvard's W.E.B. Du Bois Institute for African & African American Research, was arrested on July 16 by police sergeant James Crowley, Gates in his home Cambridge, Massachusetts.

Online polls in Massachusetts show strong support for the white arresting officer. A police union and Crowley’s department's chief also came out strongly in his defense.

Many in Massachusetts said Obama crossed a line by passing judgment on police while acknowledging he did not have all the facts.

Based on what I have seen and heard from the other officers, he maintained a professional decorum during the course of the entire situation, Cambridge Police Department Commissioner Robert Haas told a news conference.

Obama's comment stunned his policemen, Haas added. They were very much deflated, he said. It deeply hurts the pride of this agency.

Crowley said after Obama’s comment I support the president to a point, I think it's disappointing that he waded into what should be a local issue, he added.

Obama said on Thursday that he was surprised by the controversy surrounding his remark.

I think it was a pretty straightforward commentary that you probably don't need to handcuff a guy, a middle-aged man who uses a cane, who's in his own home, Obama said.

I think that I have extraordinary respect for the difficulties of the job that police officers do, he added. And my suspicion is that words were exchanged between the police officer and Mr. Gates and that everybody should have just settled down and cooler heads should have prevailed. That's my suspicion.