US President Barack Obama
US President Barack ObamaFlash 90

The House of Representatives on Monday narrowly approved a new Republican counterproposal to both rein in ObamaCare and fund the government, with just hours to go until a midnight shutdown deadline, reports Fox News.

Shortly afterwards, however, the Senate rejected the proposal, the Democrats having already warned that they will not consider any measure that targets ObamaCare. The latest moves leave roughly two hours on the clock before midnight.

The House approved its latest proposal on a 228-201 vote, according to Fox News.

The new counterproposal would delay the health law's individual mandate by a year, and also prohibit members of Congress, their staffers and other officials from receiving additional government subsidies for their health care.

That provision caused consternation among lawmakers on both sides of the aisle, with some reluctant to hurt their own staff by taking away additional subsidies for their health care costs.

Amid the drama, President Obama said he's holding out hope that Congress will come together "in the 11th hour."

A shutdown "does not have to happen," Obama said in remarks at the White House. He has already called the top four congressional leaders, including House Speaker John Boehner, though no breakthrough was reported.

Congress has until midnight Eastern Time to craft a spending bill, or else the government will begin to wind down.

The Senate earlier Monday rejected a GOP proposal that would delay the health care law by one year and repeal an unpopular medical device tax. Senate Majority leader Harry Reid warned Republicans not to fiddle with the spending bill any more. "As we said Friday, nothing has changed. If they try to send us something back, they're spinning their wheels," Reid said.

But House Republican leaders at that point were already moving forward with their latest counteroffer.

"It's a matter of fairness for all Americans," Boehner said.

Ahead of the House vote, Obama said Congress can avert a shutdown by passing a straight budget bill without "extraneous and controversial demands."

Obama warned that a shutdown would hurt all Americans, noting that the federal government is the country's largest employer.

"A shutdown will have a very real economic impact on real people, right away," Obama warned.

A prior Republican effort to include a provision defunding ObamaCare in the budget bill failed. House Republicans then voted, early Sunday, to add amendments delaying the health care law by one year and repealing an unpopular medical device tax.

The Senate, in a 54-46 vote, rejected those proposals on Monday afternoon.