In their last vote of the day, the House approved just such a bill, H.R. 3233, in a voice vote. That means the bill will go right to the White House for President Obama as soon as the Senate reconvenes on Thursday.

Senate Majority Leader Harry ReidHarry ReidConservative Senate candidate calls on GOP to end filibuster Ex-Reid aide: McConnell's 'original sin' was casting ObamaCare as 'partisan, socialist takeover' GOP faces growing demographic nightmare in West MORE (D-Nev.) said the visa program was important because those affected had risked their lives to help the U.S. military. Sen. Jeanne Shaheen Jeanne ShaheenOvernight Defense: Trump gets briefing at Pentagon on ISIS, Afghanistan | Senate panel approves five defense picks | Senators want Syria study in defense bill Gore wishes Mikulski a happy birthday at 'Inconvenient Sequel' premiere Senators ask for Syria policy study in defense bill MORE (D-N.H.) praised the votes and said it fulfills a promise the U.S. made to Iraqi citizens.

"We have a moral obligation to stand with Iraqis who stood with us during a time of war and with this bill headed to the President tomorrow we are demonstrating that we will not abandon our Iraqi partners," she said.

The visa program expired with government funding at midnight on Tuesday, when all non-essential parts of the government were shut down. Lawmakers are still at an impasse on how to pass a continuing resolution to fund the government.

After the unanimous consent agreement, the Senate adjourned for the evening, just as the House was sending over a bill to fund the D.C. government.

House Republicans latest attempt is passing piece-meal spending resolution to fund some parts of government. Reid said that "cockamamie idea" had no chance in the Senate because President Obama has threatened to veto the measures.

Congressional leaders met with Obama at 5:30 p.m. Wednesday to try to work out a deal. But that meeting ended with no agreement in sight.

— Jeremy Herb contributed.

This article was last updated at 8:39 p.m. to add the House vote.