European Union leaders have struck a late-night deal to lend Ukraine €90bn (£79bn; $105bn) over the next two years, after failing to agree on using frozen Russian assets.

Ukraine was set to run out of cash by next spring, and European Council chief António Costa said the loan would be paid back only when Russia paid reparations for its full-scale war.

We committed, we delivered, said Costa, while Ukrainian Prime Minister Yuliya Svyrydenko praised the deal as a decisive step for economic resilience.

A bid to use €210bn in Russian cash frozen in the EU, mainly in Belgium, ultimately failed as leaders could not convince Belgium's prime minister his country would be protected from Russian retaliation.

The bulk of the cash is held by Brussels-based Euroclear and interest from the frozen assets is already being paid to Ukraine. Russia has already launched legal action against the clearing house.

Russian President Vladimir Putin accused EU leaders of attempted robbery on Friday and Kirill Dmitriev, his envoy in talks with the US, claimed their failure to agree on using the assets was a fatal blow.

However, Belgium's Bart De Wever said the deal eventually agreed after almost 17 hours of negotiations was a victory for Ukraine, a victory for financial stability... and a victory for the EU. EU leaders had avoided chaos and division, he added.

Ukraine needs an estimated €137bn over the next two years to cover both its military and public services, and the EU plan is to cover two-thirds of that.

The €90bn that the EU will raise on the capital markets as part of the loan deal will be backed by EU budget headroom - the margin between actual EU contributions by member states in a year and the maximum the European Commission can spend as part of the budget.

Ukrainian President Volodymyr Zelensky expressed gratitude to European leaders for the significant support that truly strengthens our resilience.

Despite the progress, some countries within the EU, particularly Hungary and Slovakia, have raised concerns about extending additional funds to Ukraine. These countries argue that further financial support could prolong the conflict.

The dynamic at the summit underscores the challenges EU leaders face as they seek to provide assistance to Ukraine while navigating internal dissent and external pressures from Russia.