WASHINGTON - Senators moved to avoid the second government shutdown of the year by approving a short-term spending deal on Thursday.

By a vote of 74-20, the deal now heads to President Donald Trump who is expected to sign it. The federal government runs out of money at midnight Thursday. Failing to sign the deal would trigger a government shutdown Friday.

The funding bill, known as a continuing resolution, funds the federal government through Dec. 20 as lawmakers continue debating the full fiscal year 2020 budget.

The House and Senate have struggled for months to reach a long-term deal. Much of the stalemate centers around funding for Trump’s border wall and the Trump administration’s proposed cuts to Title X grant funding, which supports organization such as Planned Parenthood.

Lawmakers in both parties continue pushing for a full, one-year budget, which is technically nearly two months late of the Oct. 1 start of the new fiscal year.

“It’s a terribly broken process. It’s very, very frustrating,” said Sen. Pat Toomey (R-Pa.), one of the 24 senators voting against the one-month extension. “But, among a number of bad alternatives, a continuing resolution that keeps the doors of the government open and functioning at current levels, that’s not the worst of the available options.”

“I hope the passage of the continuing resolution will be the first step down the bipartisan path that will lead to a successful agreement by the end of the year,” said Sen. Minority Leader Charles Schumer (D-N.Y.).

Earlier this week, the U.S. House approved the measure largely on party lines.

The extension sets up the threat of a government shutdown around the holidays for the second consecutive year. The previous shutdown lasted a record 35 days in late 2018 and into early 2019.

Some Democrats are calling provisions in the budget, such as the border wall, a “poison pill” for reaching a consensus.

“This expenditure for the wall is not going to make us safer,” said Sen. Mazie Hirono (D-HI). “It’s for (President Donald) Trump’s own ego and that’s not what public money should go for.”