WASHINGTON (AP) - As Senate Republicans blocked the advance of tens of billions of dollars in military and economic assistance for Ukraine Wednesday, President Joe Biden berated their tactics as “stunning” and dangerous. Yet he also signaled an openness to what GOP lawmakers ultimately want: border policy changes.

Biden at the White House warned of dire consequences for Kyiv - and a “gift” to Russia's Vladimir Putin - if Congress fails to pass a $110 billion package of wartime funding for Ukraine and Israel as well as other national security priorities. Hours later, Senate Republicans defiantly voted to stop the package from advancing, something that they had threatened to do all week.

“They're willing to literally kneecap Ukraine on the battlefield and damage our national security in the process,” Biden said.

But even as he lashed Republicans for their stance, Biden stressed that he is willing to “make significant compromises on the border,” if that's what it takes to get the package through Congress.

That statement has raised at least some hope that progress can be made in the days ahead as the Senate grinds through negotiations on border security, one of the most fraught issues in American politics. Biden's remarks Wednesday were his clearest overture yet to Republicans and came at a critical time, with a path through Congress for the emergency funds rapidly disappearing and America's support for multiple allies in doubt.

“If we don't support Ukraine, what is the rest of the world going to do?” Biden added.

The president's statement came hours after he huddled virtually with Ukrainian President Volodymyr Zelenskyy and leaders of the Group of Seven advanced democracies, which have staunchly supported Ukraine against Russia's invasion.

“We need to fix the broken border system. It is broken,” Biden said, adding that he's ”ready to change policy as well.” He did not name specific policy proposals and accused Republicans of wanting a political issue more than bipartisan compromise.

Sen. James Lankford, the Oklahoma Republican who has been leading Senate negotiations over border policy, was encouraged by what he heard, saying it seemed like the president is “ready to be able to sit down and talk.”

Senators of both parties acknowledged they will need to move quickly if a deal is to be struck. Congress is scheduled to be in Washington for just a handful more days before the end of the year. The White House, meanwhile, has sounded the alarm about what would happen if they don't approve more funding soon, saying Ukraine's military would be stalled, or even overrun.

“When deadlines come, everybody's undivided attention is there and we realize: 'OK. Now it's time to actually solve this,”' Lankford said.

Democrats involved in the negotiations also said a direct hand from the president, as well as from Senate Republican Leader Mitch McConnell, could be helpful.

“This kind of thorny, difficult problem is exactly what Joe Biden and Mitch McConnell have worked on before. And we could use their help and their leadership on this,” said Sen. Michael Bennet, D-Colo., another negotiator.

So far, McConnell, while an ardent supporter of Ukraine aid, has sided with Republicans who are holding firm against the security package unless it includes changes to America's border policies. Every Republican voted against it advancing Wednesday evening.

Senate Majority Leader Chuck Schumer, D-N.Y., called the failed test vote a “a sad night in the history of the Senate and our country.” He urged Republicans to present a border proposal that is “serious, instead of the extreme policies they have presented thus far.”

Republican negotiators were expected to send a new proposal to Democrats after the failed vote.

Sen. Chris Murphy, D-Conn., who has been involved in the negotiations, said the Republicans' hard-charging bargain left little room for agreement and he remained skeptical that a deal can be struck.

“They have to figure out whether they want to negotiate or whether they want to make take-it-or-leave-it demands,” Murphy said.

Republicans argue the record numbers of migrants crossing the southern border pose a security threat because border authorities cannot adequately screen them. They also say they cannot justify to their constituents sending billions of dollars to other countries while failing to address the border at home.

So far, senators have found agreement on raising the initial standard for migrants to enter the asylum system. But they've been at odds over placing limitations on humanitarian parole, a program that allows the executive branch to temporarily admit migrants without action from Congress.

But Sen. John Cornyn, a Texas Republican, said the Senate talks were “never going to be able to negotiate the kind of meaningful substantive policy changes” that Republicans want. He called Biden's remarks “positive” and said the negotiations should next include the president, McConnell and House Speaker Mike Johnson.

The president's willingness to directly engage on the issue comes at a political risk. Immigrant advocates and some Democratic senators have sounded alarm about curtailing the asylum system.

Sen. Alex Padilla, a California Democrat who led a statement with 10 other senators last month calling for an increase in legal immigration to be included in negotiations, said he would be watching closely what Biden agrees to on border security.

“Devil's in the details,” Padilla said, adding that the direction of the Senate talks have been “concerning from day one.”

Even if the president and senators somehow find a way forward on border security, any agreement would face significant obstacles in the House. Hardline conservatives who control the chamber have vowed to block it unless it tacks to a broad set of forceful border and immigration policies.

Johnson, who as speaker has already expressed deep skepticism of funding for Ukraine, has signaled he won't support the aid package if it does not adhere to H.R. 2, a bill that would remake the U.S. immigration system with conservative priorities.

“The American people deserve nothing less.” Johnson said in a statement.

--

Associated Press writer Lolita C. Baldor contributed to this report.