WASHINGTON — Suddenly facing life under divided government, President Donald Trump and congressional leaders talked bipartisanship Wednesday but then bluntly previewed the fault lines to come. Trump threatened to go after House Democrats who try to investigate him, while Rep. Nancy Pelosi said her party would be “a check and balance” against the White House.

The day after midterm elections reset Washington, Trump took a victory lap at a raucous news conference, celebrating Republican Senate wins but distancing himself from the GOP’s loss of the House. He said he was interested in working with House Democrats but was ready to respond if he felt he was being ill-treated.

As long as Republicans have controlled both houses of Congress, Democrats have been hampered in pursuing any significant probes of Trump and his administration, and he made it clear he expects the Senate to follow that course.

“They can play that game,” he said of possible House Democratic investigations, “but we can play it better, because we have a thing called the United States Senate.”

On Capitol Hill, Republican Senate leader Mitch McConnell said Democrats must decide how much “harassment” they want to pursue against Trump, while suggesting there could be limited opportunities to work across the aisle. And Pelosi, who is expected to run for a second stint as speaker when Democrats take the House majority in January, said the party has “a responsibility to seek common ground where we can.” But she added, “Where we cannot, we must stand our ground.”

After midterm elections that served as a referendum on Trump’s divisive presidency, Congress and the White House reckoned Wednesday with expected Republican gains in the Senate and a Democratic flip of the House. The early positioning provided the first glimpse of how all parties will balance calls for bipartisanship with an appetite for anger going into the next two years.

By turns combative and conciliatory, Trump said Democrats and Republicans should set aside partisanship to work together. On legislative prospects, Trump said he could potentially work with Democrats on issues such as taxes, infrastructure and health care, saying it “really could be a beautiful, bipartisan type of situation.”

And Pelosi, during a news conference that was delayed because of Trump’s lengthy remarks, said she had worked productively with President George W. Bush when she was speaker a decade ago on taxes and other issues, and she welcomed the chance to do so again with Trump.

“We’d like to work together so our legislation will be bipartisan,” she said.

Still, Pelosi said Democrats weren’t elected to be “a rubber stamp” for Trump.

Some House Democrats have threatened to use the subpoena power they will gain in January to investigate Trump and administration actions. But, he warned, he will respond in kind and government will suffer.

Plus, he said, Democrats have “nothing, zero,” on him. Of the special counsel’s Russia investigation that has shadowed his administration for more than 18 months, Trump said, “I could end it right now” but “I let it go on.”

Shortly thereafter, however, it was announced that Attorney General Jeff Sessions had been forced out. His departure followed 18 months of criticism and insults from Trump, who had appointed him but objected to Sessions’ stepping aside from the Russia probe rather than guiding it.

On the potential for House investigations, Pelosi said Democrats will have a “responsibility for oversight” when they take charge in January and she will leave final decisions to committees. She wouldn’t answer a question about whether Democrats will seek Trump’s tax filings, but said committee requests for documents and hearings won’t be “scattershot.”

Democrats are expected to investigate Trump’s business dealings, his Cabinet’s conduct and his campaign’s possible ties to Russia, among other issues.

The Associated Press