WASHINGTON — In mob movies they call it “going to the mattresses” — getting ready for war.

One day after voters put an end to unaccountable, strongman-style, one-party rule in Washington, Trump moved to cover his flank. He shoved out Attorney General Jeff Sessions and installed a replacement, Matt Whitaker, who has publicly warned special counsel Robert Mueller to stay away from Trump family business dealings. The sudden switch was clear proof of who was the big winner in Tuesday’s election — and who was the big loser.

Trump understands power. He knows now that the resistance has a lot of it.

Pay no attention to anyone who whines that “well, yes, the Democrats did manage to take the House, but they didn’t … ” and then goes on to bemoan Beto O’Rourke’s loss in Texas or one of the other near-misses. A bigger wave would have been nice, but control of the House was the Big Enchilada of this election, and Democrats grabbed it. Trump’s life is about to change in ways he will not like.

I saw what looked like panic in that bizarre post-election news conference Trump held Wednesday. Predictably, he was full of bluster. The results were “very close to complete victory,” he claimed. It must have been studied professionalism that kept the assembled reporters from bursting into laughter.

For the first time, Democrats have the power to hold Trump accountable. The next House speaker — almost surely the current minority leader, Nancy Pelosi — will name a new set of committee chairmen who can call hearings, compel testimony and subpoena documents. Pelosi indicated Wednesday that oversight of the administration will be surgical rather than scattershot, but that it will indeed be performed. She and her leadership team have been plotting their first steps. This will be fun to watch.

Consider the House Intelligence Committee. The outgoing chairman, Rep. Devin Nunes, R-Calif., did everything in his power to protect Trump from any serious investigation of Russian meddling in the 2016 election and possible collusion by the Trump campaign. The incoming chairman, Rep. Adam Schiff, D-Calif., is a Harvard Law graduate and former federal prosecutor who knows how to systematically peel away layers of obfuscation and deception to reach the truth.

Think of the Government Oversight Committee under the leadership of Rep. Elijah Cummings, D-Md., who will conduct actual oversight of an administration that plays fast and loose with the rules. Think of the Financial Services Committee under Rep. Maxine Waters, D-Calif., whom Trump describes as “low-I.Q.” in racist tweets — and who is set to plumb the Trump Organization’s cozy relationship with Deutsche Bank.

Perhaps prospects like these were what put Trump in such a bad mood on Wednesday. He came into the news conference obviously determined to pick a fight. Why else would Trump have called on CNN’s Jim Acosta, who has been the president’s most visible antagonist among the White House press corps?

“You are a rude, terrible person,” Trump told Acosta, amid some back-and-forth snarling. “You shouldn’t be working for CNN.”

When Yamiche Alcindor of PBS inquired whether Trump’s rhetoric might embolden racist white nationalists, Trump accused her of asking “such a racist question.”

It was all straight from the Trump playbook: Attack the media, encourage whites to feel aggrieved, display a cartoonish toughness, never give an inch. But it all seemed frantic and overdone, as if Trump were trying to convince himself that he could handle the difficulties to come.

Trump’s massive insecurities were on full display. He blamed Republicans who lost for rejecting “the embrace” — distancing themselves from Trump in their campaigns because of his unpopularity among their constituents. They had voted loyally for Trump’s agenda, mind you, but his idea of gratitude was cruel derision. Among those he singled out was Rep. Mia Love, R-Utah: “Mia Love gave me no love. And she lost. Too bad. Sorry about that, Mia.”

Trump made reasonable-sounding noises about working with a Democratic House majority on issues such as infrastructure, health care, a middle-class tax cut and environmental policy. But then he took it all back, saying that if Democrats actually try to perform their constitutional duties of oversight and accountability there will be no cooperation on a legislative agenda.

Just hours later, Sessions was gone. The battle was joined.

Tuesday was a turning point because now the majority of Americans, who reject Trump and Trumpism, have real power. The president acted Wednesday as if he knows the second two years of his administration will be nothing like the first two years. He is right.

Eugene Robinson is a Washington Post columnist.