Few of the critics who are treating President Donald Trump’s comments on Roger Stone’s sentencing — widely viewed as unduly harsh — as an attack on the rule of law showed such strong concerns when then-President Barack Obama weighed in, repeatedly, on ongoing trials or investigations.

In 2015, President Obama told CBS news that former Secretary of State Hillary Clinton’s use of an unsecured private email server for her official communications may have been a “mistake,” but added: “I don’t think it posed a national security problem.”

The New York Times reported that FBI officials: “saw an instance of the president trying to influence the outcome of a continuing investigation — and not for the first time.” The officials recalled Obama’s comments in 2012 defending then-CIA director David Petraeus, who was under investigation for sharing classified information with a journalist with whom he was having an affair.

In 2013, a Navy judge ruled that President Obama had exerted “unlawful command influence” by harsh comments about the punishment he expected the military would mete out against those accused of sexual harassment. Obama had told a press conference in 2012: “If we find out somebody’s engaging in this, they’ve got to be held accountable — prosecuted, stripped of their positions, court martialed, fired, dishonorably discharged. Period.”

As a result, the Navy judge ruled out dishonorable discharge as a potential punishment in ongoing cases. Later, the conviction of a Marine staff sergeant was thrown out because of the possible influence of Obama’s words.

Ironically, Obama’s harsh language made prosecuting sexual assault more difficult. But the media did not turn his clumsy intervention into a national debate about the rule of law.

There was greater controversy when President Barack Obama weighed in on the arrest of a Harvard professor in 2009.

Obama said that Cambridge, Massachusetts, police “acted stupidly” when arresting Professor Henry Louis Gates, Jr. in July 2009. Gates had locked himself out of his home and forced the door open; a neighbor called police, and a confrontation ensued after Sgt. James Crowley arrived and asked for ID.

In a press conference several days later, Obama admitted he did not have all the facts, but still accused the officer of racism, placing his conduct in the context of a history of racial profiling by police:

I don’t know, not having been there and not seeing all the facts, what role race played in that. But I think it’s fair to say, number one, any of us would be pretty angry; number two, that the Cambridge police acted stupidly in arresting somebody when there was already proof that they were in their own home.

And number three, what I think we know separate and apart from this incident is that there is a long history in this country of African-Americans and Latinos being stopped by law enforcing disproportionately. That’s just a fact.

Cambridge police were hurt, and angered, by Obama’s words. In the end, tensions were smoothed over with a “beer summit” at the White House.

But it was part of a pattern of commentary, and intervention, that would continue for years. That pattern continued in the Trayvon Martin murder case, where Obama’s comments inflamed national opinion and made it politically impossible not to prosecute George Zimmerman, who was ultimately acquitted.

The culmination was then-Attorney General Loretta Lynch’s bungling of the Clinton email investigation, from which she refused to recuse herself, but which she handed over, inappropriately, to then-FBI director James Comey.

In the Stone case, Trump called Special Counsel Robert Mueller’s investigation a “witch hunt,” but did not intervene when the FBI launched a pre-dawn raid on Roger Stone, with CNN cameras in tow. Nor did he interfere with the prosecution, or the jury — led, reportedly, by an anti-Trump Democrat politician — or the verdict.

He criticized prosecutors for requesting a long sentence — as others did, too — and he did so after the investigation that Stone was convicted of impeding had been exposed as an empty pursuit in which the FBI had lied to the FISA court.

Joel B. Pollak is Senior Editor-at-Large at Breitbart News. He earned an A.B. in Social Studies and Environmental Science and Public Policy from Harvard College, and a J.D. from Harvard Law School. He is a winner of the 2018 Robert Novak Journalism Alumni Fellowship. He is also the co-author of How Trump Won: The Inside Story of a Revolution, which is available from Regnery. Follow him on Twitter at @joelpollak.