Updated

The House of Representatives took the first step in averting a government shutdown later this week by approving a temporary, two-week spending bill Tuesday to fund federal programs until mid-month and slash $4 billion in spending.

The vote was 335 to 91.

Senate Majority Leader Harry Reid, D-Nev., says his chamber will approve the same deal "in the next 48 hours."

If lawmakers don't act by Friday and present the legislation to President Obama for his signature, money for the federal government runs out.

The House, Senate and the president are at loggerheads over funding the government for the rest of the fiscal year, which ends in early fall. The House already approved one measure which makes deep cuts in spending for this fiscal year. But it's thought that Senate Democrats won't pass that bill and President Obama would be loathe to sign it.

So the stopgap bill gives leaders an additional two weeks to settle differences. But two weeks isn't much time. And if they can't forge an agreement then, the government could be on the precipice of a shutdown once again on March 18.

"We ought to be providing for funding for the balance of the year," said House Minority Leader Steny Hoyer, D-Md., about the ad hoc bill. "That's irrational, inefficient and demoralizing."

Six Republicans voted "no" on the stopgap measure. They were Reps. Justin Amash, R-Mich., Michele Bachmann R-Minn., Louie Gohmert R-Texas, Walter Jones R-N.C., Steve King R-Iowa and Ron Paul R-Texas.

Trish Turner and Anne Marie Riha contributed to this report