Leaders of both parties in the Senate are trying to clinch a deal to raise budget caps and allow Congress to enact long-term spending legislation. Such a deal would likely need support from House Democrats, given the expected conservative defections.

But Pelosi made clear that House Democrats won't hand over their votes without some concessions.

"This morning, we took a measure of our Caucus because the package does nothing to advance bipartisan legislation to protect 'Dreamers' in the House. Without a commitment from Speaker Ryan, comparable to the commitment from Leader McConnell, this package does not have my support," Pelosi said in a statement.

Pelosi noted in the unusually lengthy House floor speech that the lack of a commitment on an immigration vote would mean "a large number of members of our caucus" would not support the budget deal, either. Her remarks lasted longer than typical presidential State of the Union addresses.

The House has occasionally used a process for legislation that allows votes on multiple competing proposals and whichever gets the most votes wins. That procedure, known as a "queen of the hill" rule, was most recently used in 2015 to determine which budget proposal would be adopted by the House.

At the same time, Pelosi noted that the budget agreement “includes many Democratic priorities,” including disaster aid, opioid funding and parity for defense and nondefense spending.

As part of the deal to end the three-day government shutdown last month, McConnell said that he would bring up immigration legislation after Feb. 8. But Ryan would not make any similar promise that whatever passed in the Senate would be considered by the House.

The Trump administration is phasing out the DACA program, which allows qualifying young immigrants brought to the U.S. illegally as children to work and go to school. The roughly 700,000 DACA recipients are in limbo as lawmakers struggle to negotiate legislation that would allow them to stay in exchange for enhanced border security.

Pelosi is in a tough spot as she seeks to balance demands from liberal activists insisting Democrats hold the line on protecting Dreamers and still find a way for Congress to enact a budget deal in time to avoid another shutdown.

Pelosi on Wednesday called on Ryan to allow a vote on immigration legislation.

“Let the House work its will,” Pelosi said. “Why should the House of Representatives be constrained?”

Ryan's office pointed to past remarks by the Speaker saying that the House intends to take up an immigration bill.

"Speaker Ryan has already repeatedly stated we intend to do a DACA and immigration reform bill – one that the president supports," Ryan spokeswoman AshLee Strong said.

Current government funding expires after Thursday.

The House passed a short-term spending patch — the fifth since September — on Tuesday that would last through March 23 but enact full-year funding for the Defense Department.

The House-passed bill is expected to fail in the Senate, given Democrats' demands for parity between defense and non-defense spending. Senators are likely to strip out the full-year defense funding, potentially attach the budget deal, and send it back to the House for approval.