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 thathe 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."

Don't Miss

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."

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 that night and made a comment that really offended not just officers in the Cambridge Police Department but officers around the country," Crowley told CNN affiliate WHDH-TV in Boston.

Obama said earlier he was "surprised by the controversy surrounding" his comments.

"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 told ABC's "Nightline." Watch Crowley's boss defend the arrest »

When Obama waded into the story by answering a question about it during his news conference Wednesday night, he admitted that he "may be a little biased" because Gates is a friend.

"I don't know all the facts," he also conceded.

He said he did not know what role race played, but "the Cambridge police acted stupidly in arresting somebody when there was already proof that they were in their own home." iReport.com: Arrest sparks debate

But during his Friday remarks, Obama said he hoped the controversy surrounding Gates' arrest provides Americans with "a teachable moment" on how they can improve "relations between police officers and minority communities."

Crowley, in the police report about the incident, said Gates refused to cooperate with him and repeatedly accusing him of racism when he went to Gates' home following a report of a possible break-in July 16.

Crowley said he tried to determine whether there was someone else at the home and wanted to ensure Gates' safety.

Gates, however, told him "that I had no idea who I was 'messing' with" and was being so loud, the sergeant said, that he could not give pertinent information to the department when he was calling in.

Authorities have said they may release tapes of the officer calling in, in which Gates is heard in the background

Crowley's report said that when he asked to speak with Gates outside, the professor at one point responded, "I'll speak with your mama outside." Watch Crowley's response »

Gates' attorney, Charles Ogletree, said the professor never made such a remark.

The full story will show that Gates did nothing wrong -- and that Crowley did not identify himself at first, Ogletree said.

Gates said Wednesday he would listen to Crowley "if he would tell the truth about what he did, about the distortions that he fabricated in the police report. I would be prepared as a human being to forgive him."

Crowley has said he will not apologize. The police incident report states that Crowley twice provided his name to Gates, who subsequently asked for it two more times.

Gates ultimately was arrested for disorderly conduct, but the department later dropped the charges.

Cambridge police Commissioner Robert Haas said he "deeply regrets" the arrest but stands by the procedures his department followed.

Haas added the department is "very proud about its diversity within this community and how hard we've worked over the years to build a strong, solid relationship [between] the department and the community."

Haas said he agreed with Crowley about Obama's remarks.

"I have to tell you the officers take that very personally and basically feel hurt by that comment. We truly are trying to do the best service we can to the community and sometimes we make mistakes. We're human. But we learn from those mistakes and we move on," he said. Black in America 2: Does racial profiling still take place?

Numerous police officers, including African-Americans, have spoken up on Crowley's behalf and portrayed him as a good and fair officer. Crowley, who is white, had once been chosen by a black police officer to teach a police academy course on ways to avoid racial profiling.

Obama said he had heard of Crowley's record, saying, "I don't know all the extenuating circumstances, and as I said, I respect what police officers do. From what I can tell, the sergeant who was involved is an outstanding police officer, but my suspicion is probably it would have been better if cooler heads prevailed."

Gates' legal team argues that authorities are misrepresenting the professor and the officer, and Gates has said he is determined to keep the issue alive despite the charges being dropped.

"This is not about me; this is about the vulnerability of black men in America," he said this week.

Ogletree said Gates may bring forward people who say they've had similar experiences with Crowley.

When asked for examples, Ogletree said only that they may come out in time depending on how the police department handles the situation moving forward.

"I think you will be hearing much more complex and different perspective on him [Crowley] in the coming days and weeks," Ogletree said, alleging that Crowley "is well-known among people, particularly young people, for some of his police practices."

Gates has no immediate plans to file a lawsuit against the department, the attorney said. Ogletree had said earlier Gates might sue the police.