BOSTON (Reuters) - President Barack Obama plunged his presidency into a charged racial debate and set off a firestorm in one of America's most liberal bastions by siding with a black Harvard scholar who accuses police of racism.

Saying he was unaware of "all the facts" but that police in Cambridge, Massachusetts, "acted stupidly" in their arrest of Henry Louis Gates, Obama whipped up emotions on both sides of an issue that threatens to open old wounds in America.

His comments marked his biggest foray into the hot-button issue of race since taking office in January, and underline how racial issues remain very much alive despite advances embodied by his election as the first black U.S. president.

"Unfortunately, the racial divide is still there. It's still very raw. I think he was trying to let the majority of non-minority Americans have a sense of what it is like to a black or Latino," said Boston University professor of politics Thomas Whalen.

But many in Massachusetts said he crossed a line by passing judgment on police while acknowledging he did not have all the facts. Online polls in Massachusetts show strong support for the white arresting officer. A police union and his department's chief also came out strongly in his defense.

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

Obama's comment stunned the city's policemen, Haas added. "They were very much deflated." He said he has appointed a panel to review Gates' arrest.

Others questioned whether Obama should have so strongly backed Gates, a friend, over the police without knowing fully what took place.

"He should steer clear of it if he doesn't know all the facts," said Patricia Lynch, 49, a consultant and graduate of Harvard's Kennedy School of Government, as she emerged from a Boston cafe. "For any specific case, you have to go only by the facts of that particular case."

Gates, 58, director of Harvard's W.E.B. Du Bois Institute for African & African American Research, is a potent cultural force, listed as one of Time magazine's "25 Most Influential Americans" in 1997 and friend of talk-show star Oprah Winfrey.

His arrest outside his home last Thursday prompted a moment of national soul-searching, but the facts of the case are far from clear. Gates says the incident underlines the persistence of stereotyping, or racial profiling, even in liberal America.

'DISORDERLY CONDUCT'

Police say Gates was arrested for disorderly conduct, accusing him of being uncooperative, refusing to initially provide identification and "exhibiting loud and tumultuous behavior" by repeatedly shouting at a policeman in front of people gathered on the street in front of his house.

The incident began when a woman caller reported a man trying to force his way into a home. Gates said he was unable to enter his damaged front door after returning from a week in China. Haas said he understood the home was broken into while Gates was away. Sgt. James Crowley arrived to investigate.

The charge was dropped on Tuesday but Gates is demanding an apology from Crowley and has threatened to sue the police. Crowley has refused to apologize, saying he did nothing wrong."I support the president to a point," Crowley said after Obama's comment. "I think it's disappointing that he waded into what should be a local issue," he added on WEEI radio.

A lawyer for the Cambridge Superior Officers Association, a union, told ABC News Obama was "dead wrong to malign this police officer specifically and the department in general."

Obama's spokesman, Robert Gibbs, said the president was not calling the police officer stupid. "He was denoting that at a certain point the situation got out of hand and I think all sides understand that," he told reporters.

Still, the comments infuriated some Obama supporters.

"I may have voted for him, but I'm really disappointed he's decided to inject himself into the middle of this BEFORE getting both sides of the story. And to do so by making such an outrageous accusation against the police," wrote one Boston Globe reader on the newspaper's web site in a comment that was ranked most recommended by fellow Globe readers.

Some questioned whether the issue will mark a setback for a state where only 35 years ago black school children were pelted with rocks and bottles as they were bused into Boston's white neighborhoods in court-ordered school desegregation.

Many felt such issues were finally put to rest when Democrat Deval Patrick became Massachusetts' first black governor in 2007. At a news conference on Thursday, Patrick called the case "troubling and upsetting."