WASHINGTON – Congress has once again forestalled a government shutdown — with a short-term funding measure through mid-January — and temporarily extended funding for health insurance for children from low-income families.

The House voted 231-188 Thursday to approve a short-term spending bill that would fund most government programs at current levels through Jan. 19.

The Senate quickly followed suit, passing the bill on a 66-32 vote.

Congress was forced to act because the government was scheduled to run out of money at midnight Friday, raising the possibility of a partial shutdown heading into Christmas.

Temporary funding is needed because Congress has been unable to agree on long-term government spending levels since the 2017 fiscal year ended last September. Instead, the government has been operating on a series of short-term extensions of last year’s budget.

The measure approved Thursday keeps the government operating for a few more weeks but puts off until next year a number of tough decisions, including the reinstatement of government subsidies for health insurers providing coverage to low-income clients and protections for young Americans brought into the United States illegally by their parents.

More:Health subsidies proposal delayed, removing major obstacle to avoiding government shutdown

More:The Ghost of Shutdowns Past haunts latest talks to keep the federal government open

More:Millions depend on the Children’s Health Insurance Program.

In a separate vote, the House also advanced an $81 billion package of disaster assistance funding for states and U.S. territories ravaged by recent hurricanes and forest fires. The Senate, however, won't take up the measure until next year.

During Thursday’s debate, House Republicans said that, while not ideal, the temporary funding is needed to give lawmakers more time to resolve long-term spending issues.

A vote against the funding measure “is a vote to shut down the government,” said Rep. Greg Walden, R-Ore.

Most Democrats, however, refused to support the measure and accused Republicans of abdicating their fiscal responsibilities by delaying long-term spending decisions and instead passing a $1.5 trillion tax-reform package that would benefit corporations and the wealthy.

Short-term funding amounts to “an inefficient waste of taxpayer dollars” and “an epic failure of governing,” said Rep. Nita Lowey, D-N.Y.

In the end, however, 14 House Democrats voted for the spending measure, while 16 Republicans voted against it. In the Senate, 29 Democrats, two Republicans and independent Bernie Sanders of Vermont voted no.

Hard-line conservative Republicans in the House were unhappy because the bill did not include long-term funding for defense programs.

An earlier plan would have provided $650 billion in defense funding through the end of September, but GOP leaders abandoned that idea after Democrats made it clear they would not go long unless a similar level of funding was made available for non-defense programs. Instead, Republicans opted to add $5 billion in emergency funding for certain defense programs to the short-term bill.

In addition, the temporary spending measure provides $2.85 billion in funding for the popular Children’s Health Insurance Program, or CHIP, through the end of March. The program provides routine checkups, immunizations and other medical services for nearly 9 million children whose parents don’t qualify for Medicaid and can’t afford insurance.

Congress failed to reauthorize the program when funding expired in September. Nearly two-thirds of states have warned they will run out of money for the program by March, and several already have started sending out notices that the services will end unless Congress acts.

An earlier version of the bill would have provided five years of funding for children’s health insurance, but Democrats balked because the money would have been taken from another fund used to pay for other children’s health services, such as inoculations and treatment for lead poisoning.

“It was cannibalizing children's health care in order to pay for another version of children's health care,” said House Minority Leader Nancy Pelosi, D-Calif.

Senate Minority Leader Chuck Schumer, D-N.Y., said Democrats want to ensure the program is adequately funded, along with community health centers and other domestic programs.

“I believe we could have resolved all of these issues had my Republican colleagues, especially in the House, not put them on the back-burner while jamming through their tax bill,” Schumer said.

Besides keeping the government operating, the House’s short-term bill includes language to stop automatic spending cuts triggered by the GOP’s $1.5 billion tax reform package approved Wednesday.

It also provides $2.1 billion in funding for a program that helps veterans seek medical care in the private sector and temporarily extends the Foreign Intelligence Surveillance Act, the anti-terrorism law that allows U.S. intelligence agencies to spy on the electronic communications of foreigners living outside the United States but also collects a huge amount of email, texts and other personal data from Americans.

Despite urgent pleas from Democrats, the measure does not address the legal status of so-called DREAMers, young immigrants who were brought into the country illegally by their parents.

In September, President Trump ended the Obama-era Deferred Action for Childhood Arrivals program, which protected DREAMers from deportation if they meet certain conditions. Democrats had insisted that any year-end spending deal must include a solution for those undocumented immigrants so they won't be deported. But Republicans said the issue should be dealt with separately early next year.

At a House Rules Committee meeting Thursday morning, Republicans rejected a request from Pelosi to include the legal protections for DREAMers in the short-term bill.

House Rules Chairman Pete Sessions, R-Texas, said lawmakers will deal with the issue next year.

"We will address the issue,” he said. “We do care very much about this issue and have for a long period of time, believe it is right and it is respectful to address this issue for so many young people.”

One major obstacle to passing a short-term funding bill was removed Wednesday, when Republican Sens. Lamar Alexander of Tennessee and Susan Collins of Maine asked Senate GOP leaders to hold off until next year on bipartisan health care legislation to reinstate the government subsidies to insurers.

Collins said she had received a promise from Senate Republican leaders that the bill would be taken up before the end of the year in exchange for her support for the GOP’s tax reform plan, which received final approval Wednesday.

But hard-line conservatives in the House revolted, warning that the subsidies amounted to a government giveaway to insurers and that they would vote against the temporary spending bill if the money was included.

“In that environment, we thought our chances of getting a result were a lot better after the first of the year,” said Alexander, chairman of the Senate Health, Education, Labor and Pensions Committee.

Deirdre Shesgreen of USA TODAY contributed to this story.