President Trump got a much-needed win with a legal ruling Wednesday in the Mike Flynn case, one that echoes well beyond the fate of his former national security adviser.

When a federal appellate panel sided with Bill Barr’s Justice Department in saying the Flynn charges should be tossed, it fueled the president’s narrative that Obama-era officials had unfairly targeted the retired general and that the FBI is out of control.

Indeed, Trump wasted little time before tweeting: “Is James Comey and his band of Dirty Cops going to apologize to General Michael Flynn (and many others) for what they have done to ruin his life? What about Robert Mueller and his Angry Democrat Cronies - Are they going to say, SO SORRY? And what about Obama & Biden?”

VIRUS OUTBREAKS FORCE MEDIA TO FACE REALITY: IT NEVER WENT AWAY

The ruling was a rare bright spot after a rough couple of weeks for Trump. He endured a week of negative publicity over his Tulsa rally, culminating in a low turnout. He’s been embroiled in a controversy over testing as the coronavirus just hit its third-highest day in terms of new cases. John Bolton is bashing him all over the airwaves after another DOJ suit failed to block publication of his book.

And Wednesday, a New York Times poll found Joe Biden leading Trump, 50 to 36 percent. This follows a Fox News survey, denounced by the president as fake, that gave Biden a 12-point edge.

No wonder the president is happy that a judicial panel, by a 2-1 vote, scolded trial judge Emmet Sullivan for refusing the administration's request to drop the Flynn case. Barr took enormous heat for moving to dismiss the case, given that Flynn had twice pleaded guilty to lying to the FBI about his post-election conversations with a Russian ambassador.

The decision was written by a Trump appointee, Neomi Rao, who had worked in his White House, and was joined by a Bush judge, with an Obama judge dissenting.

In unusually strong terms, she wrote that the case is “about whether, after the government has explained why a prosecution is no longer in the public interest, the district judge may prolong the prosecution by appointing an amicus, encouraging public participation and probing the government’s motives...Both the Constitution and cases are clear: He may not.”

Sullivan could ask that the case be kicked to the full appeals court, but if not, this ends the Flynn legal saga. He was fired from his White House post after just three weeks on the job.

Even as the attorney general was notching one legal win, he was being assailed at a House hearing for his department’s intervention in the Roger Stone case. DOJ sparked a furor by asking for a lighter sentence than prosecutors had recommended. (Stone wound up with a 40-month term and is to report to prison next week, unless he is pardoned.)

SUBSCRIBE TO HOWIE'S MEDIA BUZZMETER PODCAST, A RIFF OF THE DAY'S HOTTEST STORIES

Aaron Zelinsky, who was detailed to the Mueller probe, testified that prosecutors received “heavy pressure from the highest levels of the Department of Justice,” urging that Stone be given “a break.”

Zelinsky said the acting U.S. attorney in D.C. complied “because he was afraid of the president of the United States,” that career prosecutors were told “we could be fired if we didn’t go along,” and this was all because of “Stone’s relationship to the president.”

I happen to think the original recommendation for a sentence of up to nine years was absurdly harsh, but Barr’s intervention didn’t look good, and looks even less good now. Even though he appears to have won in the Flynn case, it’s extraordinary for an attorney general to push for leniency, late in the game, for two of the president’s political associates.

But sometimes Trump’s critics overreach. Twitter has been slapping warning labels on some presidential tweets, prompting criticism that Jack Dorsey’s company is singling him out for partisan reasons.

The latest warning clearly goes too far. After hoodlums tried to topple an Andrew Jackson statue in Lafayette Park across from the White House, Trump tweeted: “There will never be an ‘Autonomous Zone’ in Washington, D.C., as long as I’m your President. If they try they will be met with serious force!”

Twitter said this violated its rules against “abusive behavior, specifically, the presence of a threat of harm against an identifiable group.”

This is ridiculous. A president has the right to threaten police action against people who are clearly violating the law. That is hardly in the same category as random yahoos or even organized groups threatening violence that itself would break the law.

Sometimes Trump critics go so far over the line that they wind up helping him instead.