(Adds McConnell, Schumer quotes, details)
WASHINGTON, Jan 18 (Reuters) - Legislation to avoid a U.S. government shutdown at midnight on Friday advanced in Congress as the House of Representatives on Thursday night approved an extension of federal funds through Feb. 16, although the bill faced uncertain prospects in the Senate.
On a mostly partisan vote of 230-197, the Republican-controlled House approved the stopgap funds, sending the bill to the Senate for consideration before the looming deadline and as President Donald Trump pushed hard for a measure he can sign.
But a mix of Democrats and Republicans in the Senate who oppose the House bill for varying reasons left the measure in a precarious spot.
A bitter fight promptly broke out on the Senate floor.
"Its content is bipartisan; there are no provisions that any of my Democratic friends oppose," Senate Majority Leader Mitch McConnell said of the House-passed bill.
McConnell added that Democrats instead were aiming to "hold the entire country hostage" by demanding that a "non-imminent problem" related to immigration be resolved immediately.
Democrats have been demanding protection from deportation for young immigrants known as "Dreamers" brought to the country illegally as children.
In September, Trump said he was ending former President Barack Obama's Deferred Action for Childhood Arrivals (DACA) program that has been shielding around 700,000 of the immigrants, who are mostly from Mexico and Central America.
He set a March 5 deadline for Congress to write legislation dealing with the "Dreamer" immigrants.
But Democrats have argued that since September, an average of 122 "Dreamers" a day have been losing their DACA protections, leaving them in limbo.
Senate Democratic leader Chuck Schumer, responding to McConnell, said: "We all know what the problem is. Its complete disarray on the Republican side," referring to conflicting immigration demands floated over the past several months by the Trump administration.
Instead of passing a month-long patch to government spending, Schumer proposed a "very short-term" bill to keep the government running that he said could spark a deal over the next few days on immigration and overall spending levels through Sept. 30, the end of this fiscal year.
House passage came only after conservatives secured a promise from House Speaker Paul Ryan that he would soon advance some type of legislation to bolster U.S. military readiness, said Republican Representative Mark Meadows.
Meadows, head of the conservative House Freedom Caucus, did not provide details and Ryan aides were not immediately available for comment.
CHILDREN'S HEALTHCARE EXTENSION
As of late on Thursday, there was no visible sign that Republicans who control Congress would meet Democrats' demands for including a plan for the "Dreamers" in the temporary spending bill.
Besides extending government funding for a month to give negotiators more time to work on a longer deal, the temporary spending bill would extend for six years the Children's Health Insurance Program (CHIP) for low-income families.
Republicans inserted the measure in a move partly to lure Democratic support.
Nevertheless, Schumer said earlier on Thursday that the House bill to fund the government was very likely to be unacceptable to the Senate."
With the fate of the spending bill uncertain, federal agencies were being instructed to prepare for partial government shutdowns throughout the country on Saturday.
If money were to run out, many federal agencies would be shut down and workers sent home. But "essential services" dealing with public safety and national security would continue.
The 2018 fiscal year began last Oct. 1. Congress' inability to agree on overall funding levels has meant that the government has been operating on a series of temporary measures that mainly kept spending at the previous year's levels.
(Reporting by Richard Cowan and Amanda Becker; Editing by Peter Cooney)