Treasury Secretary Janet L. Yellen and Ukrainian Finance Minister Sergii Marchenko held a signing ceremony Wednesday advancing plans to provide Ukraine with $50 billion in loans, breaking a months-long logjam and providing Kyiv with cash it urgently needs before the end of the year.

The plan relies on the interest accruing on roughly $280 billion in Russian central bank assets kept in Western accounts but frozen since the start of the war in 2022. That interest, estimated at several billion dollars each year, would go to repay the loans over time. The United States will lend $20 billion before the end of this year, and European and other Western allies are expected to provide more than $30 billion.

Yellen announced this week that allies have agreed to require Russia to pay the loan back if the war ends before the interest can cover the total — a move intended to keep it from becoming Western taxpayers’ responsibility. Finance ministers from around the world are in Washington now for meetings of the International Monetary Fund and World Bank.

The breakthrough represents a victory for Yellen, who has worked with her international counterparts for much of this year to find a way to use Russian central bank assets to help Ukraine. It also reflects the lengths the Western allies have gone to maintain the flow of funding for Kyiv, adopting a strikingly aggressive measure that few diplomats thought possible until recently.

“[Russian President Vladimir] Putin is engaged in a contest of wills with our coalition, and he is counting on us to retreat,” Yellen said at a news conference Wednesday. “We will not retreat. … We will do everything we can to support Ukraine.”

Russia has characterized the plan to use its bank assets as an attack on its sovereignty and the rule of law, while defenders of the plan have argued that the Kremlin deserves to face consequences for illegally invading Ukraine in 2022. Western officials have been eager to finish the loan before the U.S. election, given former president Donald Trump’s repeated skepticism of the Ukrainian cause.

Kremlin spokesman Dmitry Peskov said this month that the plan amounted to “stealing our money.”

“They will definitely have legal consequences. This is nothing but illegal expropriation,” Peskov said. “It’s an illegal action.”

Ukraine faces a deficit as high as $45 billion next year, and the additional infusion from the West could help avoid painful cuts to government services or tax hikes that could slow its economy to a halt, said Oleg Ustenko, who has served as an economic adviser to the Ukrainian government. Many Ukrainians also worry that if Trump wins, he would cut off any additional U.S. support to Ukraine, including military assistance.

“It’s crucially important from two points of view: We have to make sure the country is about to continue its fight against Russia, so inside the country it’s a very powerful and symbolic action. But it’s also extremely important to mitigate the risk related to a possible cut in financial support if Trump is elected,” Ustenko said. “It’s a big, big question mark if the U.S. will continue to see this level of support, and it could be a significant problem.”

The United States and European allies imposed sanctions freezing Russia’s central bank assets after its 2022 invasion of Ukraine. U.S. officials have since pushed for all of those assets to be confiscated and redirected to Ukraine, but some European countries strongly opposed the idea, raising concerns about the legality of the move and the potential to undermine investor confidence in Europe, where most of the Russian bank assets are held.

The agreement to use only the interest emerged as a successful compromise that both sides could support. But even after that understanding was reached this year, logistical challenges slowed disbursement of the aid. Washington sought safeguards that it would not be left on the hook for loans if European Union sanctions were one day loosened, unfreezing the assets.

The particular concern was that Hungary and its Moscow-friendly prime minister, Viktor Orban, might veto the sanctions, which must be renewed unanimously by E.U. members every six months. The United States had pushed for the assets to remain frozen for a longer period, but that would require E.U. unanimity, which Hungary made impossible.

But the prospect of another Trump presidency gave the Europeans greater urgency to act before the end of the year. As the joint initiative stalled, the European Union decided in recent weeks to lend Ukraine up to 35 billion euros (nearly $38 billion). Now, the United States is also moving forward, despite concerns from congressional Republicans and others who have said American taxpayers have already shouldered too much of the financial burden of the war. Congress has approved more than $100 billion in aid for Ukraine since the start of the war, according to the Council on Foreign Relations, a Washington-based think tank.

“You shouldn’t be allowed to have it both ways — both to benefit from your position in the global economy and attack the global economy,” said Simon Johnson, an MIT economist, who called the loan a “remarkable achievement” for the U.S. Treasury. “This sends a signal to other countries, including China, that you should play by the rules on international security. It’s an entirely fair and reasonable message.”