Even when President Obama is on vacation in Martha's Vineyard, he still has to attend to the duties of the Oval Office. Lawrence Knutson, author of "Away from the White House: Presidential Escapes, Retreats, and Vacations," gives a look back at the origin of presidential vacations and the criticism that accompanies them. (Jayne W. Orenstein/The Washington Post)

When President Obama emerged after a night of dancing, surf and turf, and partying in Martha’s Vineyard to address rioting and aggressive displays of police behavior in Ferguson, Mo., he said there is no “excuse for violence against police.” But, he added, “there’s also no excuse for police to use excessive force against peaceful protests.”

That was enough to anger a group representing police across the country, which argued that Obama ought not weigh in on how the authorities are carrying out their legal duties more than a thousand miles away.

“I would contend that discussing police tactics from Martha’s Vineyard is not helpful to ultimately calming the situation,” Fraternal Order of Police executive director Jim Pasco told the Capitol Hill publication The Hill.

Pasco’s office said he would not be commenting further. But his criticism highlighted both the risks Obama took in weighing in on a criminal justice issued with strong racial overtones — and the tricky optics of doing so while on vacation more than a thousand miles away.

Obama hit the links just four minutes after making his statement Thursday, calling for peace and restraint following the shooting of an unarmed black teen.

During a speech in Massachusetts on Thursday, President Obama addressed the continued protests and clashes in Ferguson, Mo., following the death of 18-year-old Michael Brown. (The Associated Press)

But all year long, he has faced criticism, usually from conservatives, for taking leisure time in the face of crisis. He drank beer and played billiards with the governor of Colorado while dismissing calls to visit children detained at the border. He enjoyed a golfing weekend in California as the Iraqi city of Mosul fell to the terrorist group known as the Islamic State. He opted to continue with a previously planned vacation in Key West, Fla., as Russia annexed Crimea.

Now, he is vacationing in Martha’s Vineyard as crises in Ukraine, Gaza, Iraq and Syria all crest anew — and a St. Louis suburb is rocked by violent clashes between police and protesters.

Obama isn’t the first president to face vacation-linked leadership questions. His predecessor, George W. Bush, drew critiques for spending more than a year of his presidency at his Texas ranch.

White House officials reject that brand of criticism, noting that the president is always on duty, even while he’s away from the Oval Office. They point out that Obama received briefings all week long on the situation in Iraq and the riots in Ferguson.

On Thursday, the president made his first public comment on the situation there other than a written statement earlier in the week. He called for calm and mutual respect. “I know that emotions are raw right now in Ferguson and there are certainly passionate differences about what has happened,” he said.

But with his comment questioning whether the police are using excessive force against protests, Obama stirred passions of his own.

“I think what he has to do as president and as a constitutional lawyer is [to] remember that there is a process in the United States and the process is being followed, for good or for ill, by the police and by the county and by the city and by the prosecutors’ office,” Pasco, the Fraternal Order of Police executive director, told The Hill.

The criticism was reminiscent of an early stumble in Obama’s term, when the president said a Cambridge, Mass., police officer “acted stupidly” when he arrested Harvard professor Henry Louis Gates outside his house. The comment, delivered at a White House news conference, stirred outrage in the law enforcement community.

Obama ultimately was forced to hold a “beer summit” at the White House in order to smooth over relations.

Since that kerfuffle, Obama largely steered clear of issues of race and criminal justice. In his second term, he has more squarely addressed the issues, usually without provoking much criticism. He addressed the nation after the verdict in the trial of George Zimmerman, who was accused of killing Trayvon Martin.

His attorney general, Eric Holder, has usually been the one to weigh more directly into criminal justice issues with strong racial backdrops.

On Thursday, Holder said he was “deeply concerned that the deployment of military equipment and vehicles sends a conflicting message,” questioning the judgment of local authorities. Holder briefed Obama in Martha’s Vineyard.

And indeed, the president has increasingly found support across the aisle. Republican lawmakers also raised concern about the militarization of local police forces.

On policy, Obama and the law enforcement community have often found themselves in step. Police groups backed Obama’s unsuccessful efforts, for example, to tighten gun controls, often standing behind him as the president held events calling on Congress to act.

Police issues, however, haven’t figured prominently during the president’s term, with crime generally low.

But the White House is keenly aware that exactly what the president has to say about law enforcement issues now — and exactly where he chooses to say it — may now be a top target for critics in the days ahead.

Katie Zezima contributed to this story.