Among the Democratic ranks in the House, the objections were also strenuous, but for reasons very different from Mr. Paul’s.

With the monthslong budget impasse appearing to be on the cusp of a resolution, lawmakers were girding for a fight over the fate of young immigrants who were brought to the country illegally as children, known as Dreamers, as well as Mr. Trump’s plan to build a wall along the southern border with Mexico and other possible immigration policy changes.

The uncertain outlook for immigration legislation, and the disagreements on the best strategy to move forward, was starkly apparent as Ms. Pelosi commanded the House floor for more than eight hours on Wednesday in an effort to help the young immigrants. She said she would oppose the budget deal unless Mr. Ryan offered a commitment to hold a vote on legislation in the House that would address the fate of the Dreamers.

On Thursday, Ms. Pelosi herself displayed the conflicting pressures on Democrats. She simultaneously hailed the budget deal while proclaiming she would vote against it. In a letter to colleagues, she explained her opposition to the deal, but also nodded to its virtues and held back from pressuring other Democrats to vote against it.

“I’m pleased with the product,” she told reporters. “I’m not pleased with the process.”

In his own comments to reporters on Thursday, Mr. Ryan stressed his desire to address the fate of the young immigrants. But he did not offer the kind of open-ended commitment that might assuage Ms. Pelosi. Instead, he signaled that whatever bill the House considers would be one that Mr. Trump supports.

“To anyone who doubts my intention to solve this problem and bring up a DACA and immigration reform bill, do not,” he said. “We will bring a solution to the floor, one that the president will sign.”

Just before the vote on Friday morning, Mr. Ryan offered a further reassurance about his commitment to addressing DACA. Once the budget deal has been approved, he said, “we will focus on bringing that debate to this floor and finding a solution.”