Senate leaders have brokered a long-sought budget agreement that would shower the Pentagon and domestic programs with an extra $300 billion over the next two years.

Senators hope to approve the measure Thursday and send it to the House for a confirming vote before the government begins to shut down at midnight. But hurdles remain.

The measure represents a bitter defeat for many liberal Democrats who sought to use the party's leverage on the budget to resolve the plight of immigrant "Dreamers" who face deportation after being brought to the U.S. illegally as children.

Top House Democrat Nancy Pelosi of California mounted a remarkable daylong speech on the House floor, trying to force GOP leaders in the House to promise a later vote on legislation to protect the younger immigrants.

House Minority Leader Nancy Pelosi ended an eight-hour speech aimed at forcing a House vote on protections for young immigrants known as "Dreamers" late Wednesday.

The California Democrat took to the House floor at about 10:04 a.m. Eastern time and yielded at 6:11 p.m. Caucus leaders are allowed to speak without limits under House rules.

Wearing four-inch heels and forgoing any breaks, Pelosi read touching and personal letters from the young immigrants whose temporary protection from deportation is set to expire next month.

The performance had no immediate impact on Republican leaders, who have not agreed to a vote.

Pelosi says she hopes the House follows the Senate's example and takes up an immigration bill. She says it should be "bipartisan, transparent and unifying."