WASHINGTON — If Donald Trump thought his presidency so far has been harder than he expected, Nancy Pelosi’s retaking of the gavel in the House of Representatives is about to make those first two years seem easy in comparison.

Instead of shielding Trump, his administration, his business and his family members from investigations, the California Democrat is expected to crank them into high gear. Instead of throttling legislation that is popular with the general public but makes Trump and Republicans look bad, she will pass it, and dare the Senate and Trump to oppose it.

“I don’t think the president or his team fully appreciate how miserable having a House Democratic majority will be,” said one Republican consultant on condition of anonymity.

A former White House official said Trump’s daughter Ivanka and son-in-law, Jared Kushner, had told the president that a Pelosi speakership would actually be good for him.

“He’s only now realizing that Javanka misled him,” the official said, also on condition of anonymity and using a nickname for the couple.

Trump made a surprise visit to the White House briefing room Thursday afternoon to congratulate Pelosi and to predict he would work well with her. “I think it’s actually going to work out. I think it will be a little bit different than what a lot of people are thinking,” Trump said.

ASSOCIATED PRESS “It seems like they haven’t given much thought to the legislative headaches” Pelosi could cause, said scholar Ramesh Ponnuru of the White House.

Ramesh Ponnuru, a scholar with the conservative American Enterprise Institute, remained unpersuaded. He said that Trump’s White House seems to understand the threat posed by Democrats’ new ability to investigate using congressional hearings and subpoenas, but “it seems like they haven’t given much thought to the legislative headaches” Pelosi could cause.

If Trump demands legislation important to him, Pelosi and Democrats could counter it with something they want.

If Trump pushes restrictions on immigration, as he has in the past, House Democrats could pass the comprehensive immigration bill that cleared the Senate in 2013, which includes a path to citizenship for those who entered this country illegally.

If Trump insists on funding for his border wall, Democrats could agree to pass it on the condition that the bill also include protection for special counsel Robert Mueller’s investigation of Trump. Or a requirement that all presidential candidates produce 10 years of tax returns. Or both.

Democrats could also bring to the floor and pass proposals that are popular generally but that traditionally have been opposed by Republicans — and thereby force House Republicans to take a public stand on them.

“Just increasing the minimum wage is an issue that’s popular and that splits Trump’s coalition,” Ponnuru said.

The new Democratic House majority will likely not have much effect on Trump’s own legislative agenda, primarily because he has not had much of one.

While Trump likes to boast about the tax cut bill, legislation rolling back regulations and his appointment of a record number of conservative appeals court judges, in reality, all of those likely would have happened with any Republican president working with a Republican Congress. The uniquely “Trumpian” elements of his agenda — such as cutting back on legal immigration or backing out of trade agreements — have not received much support at all from congressional Republican leaders in either chamber.

“He didn’t need or want much. He didn’t ask in a serious way for much. And he didn’t get much,” Ponnuru said.

I don’t think the president or his team fully appreciate how miserable having a House Democratic majority will be. Republican consultant

In any event, Republicans’ bigger concern now is the legislation originating in Pelosi’s House. Raising the minimum wage, protecting Mueller, requiring tax returns of presidential candidates and offering a path to citizenship for undocumented immigrants, particularly those brought into the country as children, are all popular among the general public but have been blocked by Republican House leaders in the past.

When those or similar bills pass the House, the only thing stopping them from passing Congress could well be Senate Majority Leader Mitch McConnell.

“All eyes should be on Mitch McConnell. Mitch McConnell understands the implications of House Democratic control even though the White House doesn’t,” said David Jolly, a former Republican congressman from Florida. “McConnell’s full-time role is going to be preventing legislation from getting to the president.”

It’s a role he has already started playing. When Pelosi announced that the first legislation to pass under her leadership would be bills ending the partial government shutdown — bills that had already won strong Republican support in the Senate last year — McConnell quickly responded that he would not bring them to the floor because Trump would not sign them.

In an interview with CNN, McConnell said he was waiting for Trump to come to an agreement with Pelosi and Senate Minority Leader Chuck Schumer, since he needs seven Democratic votes to pass legislation. “So, I haven’t been sidelined,” McConnell said. “It’s just that there’s no particular role for me when you have this setup.”

Jolly said he is not sure that explanation will pass the straight-face test with bills that clearly have enough bipartisan support to pass McConnell’s chamber. “There will be a moment when the votes are there in the Senate, and McConnell doesn’t let it pass,” he said.

Stan Collender, who for decades worked on Capitol Hill as a budget committee staffer, said that dynamic could be a dangerous one for Trump. “Looks like McConnell is willing to take the bullet for Trump so far,” Collender said. “If and when that changes, this will become a real shit show for the White House. That will be the real loss of the Trump base.”