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 ReidVirginia was a wave election, but without real change, the tide will turn again Top Lobbyists 2017: Grass roots Boehner confronted Reid after criticism from Senate floor MORE (D-Nev.) said the visa program was important because those affected had risked their lives to help the U.S. military. Sen. Jeanne ShaheenCynthia (Jeanne) Jeanne ShaheenQuestions loom over Franken ethics probe State Dept. spokeswoman acknowledges 'morale issue' Democrats scramble to contain Franken fallout  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.