Timing is everything, and timing explains President Trump’s decision to finally pull the ripcord and open the Obama administration’s bag of dirty tricks.

With his memo giving Attorney General Bill Barr the authority to declassify any documents related to the investigation of the 2016 campaign, Trump made good on a longstanding promise. Most important, his decision signaled that the War of Washington is entering a crucial new phase.

The president is going nuclear.

Democrats who thought control of the House gave them control of the agenda now will face stiff competition. Their expressions of outrage will seem tired next to the sensational revelations about the actions of Jim Comey, John Brennan and ­others.

Based on what we already know, it is highly likely those revelations will prove the White House, FBI and CIA engineered the greatest scandal in American political history by unjustified spying on Trump and by trying to tip the election to Hillary Clinton.

Predictably, Dems are furious at Trump’s decision, with many on the left launching personal attacks on Barr. He’s not getting Brett Kavan-augh-level smears yet, but give them time.

Among the usual suspects, Rep. Adam Schiff called the president’s order “un-American.” That’s mighty rich, given his claims for two years that he had evidence Trump colluded with Russia. Odd that he never gave it to special counsel Robert Mueller.

But while Schiff, Rep. Jerry Nadler and others overplayed their hands and became CNN stars by tormenting Trump, they are not to blame for his decision. The distinction belongs to Speaker Nancy Pelosi.

After months of dancing between her party’s impeachment caucus and those who see it as political disaster, Pelosi sided with the impeachers by accusing Trump of a “coverup.”

That was Wednesday morning, and it was the final straw. Hours later, Trump walked out of their meeting on infrastructure, told the media that “I don’t do coverups” and put in motion the declassification order released Thursday.

The order means Trump is giving up on getting major legislation passed before the 2020 election. In his mind, making the 2016 documents public was always a declaration of war that would end any hope of bipartisanship.

Recall that he had often promised to release them, but never did. He said he was waiting for the right time, calling the documents the ultimate counterpunch.

Last November, in an Oval Office interview, he told me and two Post colleagues that if the Dems, who had just won the House in the midterms, engaged in “presidential harassment,” that would be the right time.

“I will hit them so hard, they’ve never seen a hit like that,” the president warned. “If they want to play tough, I will do it. And they will see how devastating those pages are.”

Still, Trump’s patience has been a mystery. I along with many others ­argued that release of internal records and communications about the Russia probe would shock the nation and be faithful to his promise of historic transparency.

Once he came close but pulled back, reportedly at the urging of Deputy Attorney General Rod Rosenstein, who was overseeing the Mueller probe. That was odd because Rosenstein had a clear conflict of interest, having signed the final application to spy on Carter Page. That is just one of the documents that will be released because the application likely misled judges on the FISA Court.

Trump also hoped that, once the Mueller probe ended, Dems would be a more normal opposition party and he could make deals with them on critical issues.

Besides, he had a fondness for Pelosi, as demonstrated by his offer to help secure GOP votes to make her speaker if Dems were too divided. “You know, she loves this country. And she’s a very smart woman. She’s done a very good job,” he said the day after the midterms.

She, too, took the high road then.

“We have all had enough of division,” she said. “Americans want peace. They want results.”

Yet even after Mueller finished and found no collusion or clear evidence of obstruction, Trump sat on the documents, hoping Dems would accept the outcome and negotiate over ­infrastructure.

That, after all, was something they always said they wanted to do, and Pelosi and Dem Senate leader Chuck Schumer appeared to be almost giddy after an early May meeting at the White House.

But Pelosi’s “coverup” remark changed everything because of the inevitable consequences it carries. If she really believes the president is committing a crime, she has left ­herself no logical course except ­impeachment.

So Trump delivered his counterpunch, along with a volley of insults.

Democrats are not alone in being furious about the coming release of the documents. Their media handmaidens suddenly are all for keeping the secrets secret.

The New York Times reached a new low by declaring in a news story that Trump is using “the intelligence to pursue his political enemies.”

The article, by David Sanger, never entertains the possibility that Barack Obama weaponized the FBI and CIA to block Trump from becoming president, or that Comey, Brennan and others aimed to depose him.

To consider that possibility would be to practice journalism. The Times doesn’t do that anymore.

Instead, the Gray Lady has become the errand boy for the deep state. Reporters grant their law enforcement and intelligence sources anonymity, despite that some were surely part of the conspiracy and committed crimes.

If the Times had its way, Comey would still be running the FBI and Peter Strzok and Lisa Page would be unknown to the public.

Which raises a possibility: The documents could reveal which members of the media the conspirators trusted for leaks and protection.

Count that as a bonus of transparency.

Thriving scandal

What is Thrive?

That’s one of the questions city Comptroller Scott Stringer raises about the mental health program Mayor Putz created for wife Chirlane McCray to run.

Nobody can figure out what it does and where the money goes, to the tune of $250 million a year. Stringer, the City Council and the media are asking the right questions, but aren’t getting answers.

It’s time for federal prosecutors to join the hunt. Because even in Bill de Blasio’s New York, $250 million a year is a lot of money.

Throwing gas on voters’ ire

The green zealots who dictate state energy policy should meet Don Ogilvie, a contractor on Long Island. He writes:

“I have been informed by PSE&G that they are not hooking up new gas customers. So on any new home or renovation I’m forced to install oil-fired equipment.

“I wish the people of this state would use common sense and elect public officials who represent their constituents and not their own interests. I guess when pigs fly, right?” Right.

History repeats

What’s old is new again.

From AFP in Berlin: “Germany’s government commissioner on anti-Semitism has warned Jews about the potential dangers of wearing the traditional kippah cap in the face of rising anti-Jewish attacks.”