The president then became serious, taking up a chronology of the events last week after the police received a report of a possible break-in at the home of Mr. Gates, a leading authority on African-American history.

“The police are doing what they should,” he said. “There’s a call. They go investigate. What happens?

“My understanding is that Professor Gates then shows his I.D. to show that this is his house, and at that point he gets arrested for disorderly conduct.”.

Image A photo taken by a neighbor of the arrest last week of Henry Louis Gates Jr. in Cambridge, Mass. Credit... B. Carter/Demotix Images, via Associated Press

“I don’t know, not having been there and not seeing all the facts, what role race played in that,” Mr. Obama continued. “But I think it’s fair to say, No. 1, any of us would be pretty angry; No. 2, that the Cambridge police acted stupidly in arresting somebody when there was already proof that they were in their own home; and No. 3, what I think we know separate and apart from this incident is there is a long history in this country of African-Americans and Latinos being stopped by police disproportionately. That’s just a fact.”

The Cambridge police dropped disorderly conduct charges against Professor Gates on Tuesday, but he says he still wants a personal apology. Professor Gates has said he thinks it was because he is black that the officer, Sgt. James Crowley, had not at first believed he lived in the upscale home.

Many of Professor Gates’s friends say they believe he may still file charges against the Cambridge Police Department.