A partisan clash between Senate Republicans and Democrats over border policy continues to threaten the effort to send badly needed foreign aid to key US allies as time and money are running out for Ukraine.

Senate negotiators are vowing to continue to try to reach a deal, after Republicans blocked foreign aid from advancing Wednesday evening in protest over the package’s lack of changes to border and immigration policy. The impasse among negotiators has taken on a renewed sense of urgency as the 2023 congressional calendar is drawing to a close.

The Senate has struggled for weeks as it tied immigration and border security policy – one of Congress’ historically most divisive issues – to a legislative package for sending aid to key US allies, among them Israel and Ukraine. Republicans’ insistence on changes to border policy have led to increased tension on Capitol Hill, including a classified briefing earlier this week that devolved into a closed-door shouting match.

Lawmakers are only scheduled to be in session through next week before breaking for a weekslong holiday recess, but senators were already calling to stay through the holidays until a deal is reached as the White House warned this week that Ukraine was in dire need of support.

“If I have to be here on f—ing Christmas Day, I’ll be here,” Democratic Sen. Jon Tester of Montana told reporters ahead of the failed vote, explaining the bill was too important not to reach a deal that he stressed would require compromise on both sides.

Sen. James Lankford of Oklahoma, the leading Republican negotiator in border talks, pledged that he will continue to try and negotiate a path forward on border policy even as many senators in leadership and within the group have signaled it may not be completed before the end of the year.

“This is not the end,” Lankford said just off the Senate floor as the vote to advance the foreign aid package was failing.

The tally for the procedural vote was 49 to 51, falling short of the 60-vote threshold needed proceed. At the end of the vote, Senate Majority Leader Chuck Schumer switched his vote to “no” – a procedural move that will allow him to bring up the measure again in the future.

Schumer said Wednesday represented a “sad night” after the failed vote, but said that Democrats “remain committed to working very hard to find a solution to this impasse.”

Republicans have insisted that the foreign aid must be paired with major border security policy changes. There have been talks to try to find consensus, but no bipartisan deal has been reached over the contentious issue.

The stalemate comes amid Israel’s war against Hamas and Ukraine’s war against Russian aggression. The White House issued a dire warning earlier this week that funding for Ukraine is running out and failure to secure an agreement to approve further aid will present critical national security risks.

Senate Minority Leader Mitch McConnell said ahead of the vote that Republicans would block the bill when it came up for consideration because they believe it does not adequately address border security.

“Senate Republicans are going to deny cloture on a bill that doesn’t address America’s top national security priorities in a serious way. As we’ve said for weeks, legislation that does not include policy changes to secure our borders will not pass the Senate,” he said on the Senate floor.

Schumer has accused Republicans of “hostage taking” as the path to passing aid to Ukraine and Israel remains unclear.

Schumer warned on Tuesday that “without more aid from Congress, Ukraine may fall, democracy in Europe will be imperiled and those who think Vladimir Putin will stop merely at Ukraine willfully ignored the clear and unmistakable warnings of history.”

Republican senators have warned that they are on track to leave for the holidays without passing the supplemental, a stark message to their Democratic colleagues who they say aren’t serious enough about border security.

“It’s becoming more and more apparent that we are not going to be able to pass a supplemental, which I think is terrible,” Sen. John Cornyn, a Republican from Texas, told CNN.

“If I was a betting person, right now I would say I don’t know how you land this before the holidays unless we’re here right at the very end. But, we’ll see,” Senate GOP Whip John Thune said. “Maybe all of a sudden, there will be a convergence of views about the need to get this done.”

President Joe Biden urgently called on Congress to pass aid for Ukraine in an impassioned speech on Wednesday.

“Make no mistake: today’s vote is going to be long remembered. And history is going to judge harshly those who turned their back on freedom’s cause. We can’t let Putin win,” Biden said.

Senate Democrats have released legislative text for a $110 billion security assistance package that includes funding for Israel and Ukraine and humanitarian assistance for civilians in Gaza, among other priorities. The bill includes border security provisions, but a bipartisan deal hasn’t been struck over the issue.

In November, the GOP-controlled House passed a bill to provide $14.3 billion in aid to Israel. Democrats, however, took issue with the bill over the fact that it would enact funding cuts to the Internal Revenue Service and that it did not include aid to Ukraine.

House Speaker Mike Johnson has also stressed the importance of border security. “Any national security package has to begin with the security of our own border,” he said at a news conference Tuesday.

Johnson blamed Democrats for the failed Senate procedural vote on Israel and Ukraine aid because they didn’t adhere to the GOP’s demands on the border, saying this vote shows they need to come to the table to find a solution.

“Now that Senator Schumer has demonstrated there is not enough support for his partisan approach, House Republicans reiterate what we have said all along: any supplemental national security legislation must secure our own border,” Johnson said in a statement. “The American people deserve nothing less.”

This story and headline have been updated with additional developments.

CNN’s Haley Talbot and Betsy Klein contributed to this report.