WASHINGTON (CNN)  -- President Obama said Friday he spoke with the police officer who arrested a Harvard professor and told the officer he did not mean to malign the Cambridge Police Department when he said police acted stupidly.



President Obama on Friday explains to reporters the details of a phone conservation with Sgt. James Crowley.



The president acknowledged that his words "helped to contribute to ratcheting" up the situation when he criticized the manner in which Sgt. James Crowley arrested professor Henry Louis Gates Jr.



"I unfortunately gave an impression that I was maligning the Cambridge Police Department or Sgt. Crowley specifically," Obama told reporters. "I could have calibrated those words differently, and I told this to Sgt. Crowley."  Watch Obama describe talk »



Obama spoke about two hours after police unions in Massachusetts called on him to apologize. He did not apologize for his remark but repeated that he believed his choice of words was unfortunate.



He reiterated his assertion that he believes police overreacted, but said Gates "probably overreacted as well."



"My sense is you have got two good people in a circumstance in which neither of them were able to resolve the incident in the way that it should have been resolved," he said.



Obama also spoke briefly with the arrested professor, Henry Louis Gates Jr., who is a friend of the president, the White House reported. He and Gates had a "positive discussion" about his call to Crowley on Friday afternoon, the White House said. Obama also invited Gates "to join him with Sgt. Crowley at the White House in the near future."



In an e-mail Friday to CNN's Don Lemon, Gates wrote, "I was very pleased that the president called me today, and I was pleased that he proposed that I meet with Sgt. Crowley at the White House, since I had offered to meet with him since last Monday.



"I am eager for this to be used as a teaching moment to improve racial relations in America," said the e-mail. "This is certainly not about me."



His attorney, Charles Ogletree, told Lemon that he applauds Obama's intervention and "I look forward to working this out with all parties amicably."



Asked if he plans to file suit, Ogletree said, "It depends on the response from everyone involved as to how we'll proceed."



Earlier Friday, police unions said Obama should apologize to members of the Cambridge Police Department for saying they acted stupidly, the president of a city police union said.  Watch African-American colleagues defend Crowley »



Dennis O'Connor, president of the Cambridge Police Superior Officers Association, also took aim at Massachusetts Gov. Deval Patrick, who reportedly has characterized the arrest as "every black man's nightmare and a reality for many black men."



Echoing the words of Crowley, O'Connor said he was dismayed that the president and governor would opine on the issue without all the details.



"It's noteworthy that both qualified their statements by saying they did not have all the facts," O'Connor said as members of his and another police union stood behind him. "Usually, when one hears those words, one would expect the next words to be 'so I cannot comment.' Instead, both officials, both admitted friends of professor Gates, proceeded to insult the handling of this case."



He further said Cambridge police resent the implication they allowed race to dictate their actions in the situation.



"We hope that [Obama and Patrick] will reflect upon their past comments and apologize to the men and women of the Cambridge Police Department," O'Connor said.



Steve Killian, president of the Cambridge Police Patrol Officers Association, also called on Obama to apologize to "all law enforcement personnel throughout the entire country that took offense to this."



Crowley previously said Obama had offended police in Cambridge and elsewhere.



"I was a little surprised and disappointed that the president, who didn't have all of the facts by his own admission, then weighed in on the events of
What does the Union ask Obama to do? What does the president say? Who did the union ask Obama to apologize to? What is Gates eager for? What is Gates eager about?
apologize "helped to contribute to ratcheting" members of the Cambridge Police Department this to be used as a teaching moment to improve racial relations in America," for this to be used as a teaching moment to improve racial relations in America,"
question: What does the Union ask Obama to do?, answer: apologize | question: What does the president say?, answer: "helped to contribute to ratcheting" | question: Who did the union ask Obama to apologize to?, answer: members of the Cambridge Police Department | question: What is Gates eager for?, answer: this to be used as a teaching moment to improve racial relations in America," | question: What is Gates eager about?, answer: for this to be used as a teaching moment to improve racial relations in America,"