BARI, Italy, June 13 (Reuters) - Group of Seven leaders will aim to boost funding for Ukraine in its war with Russia and offer a united face in confronting China's political and economic ambitions at their annual summit in southern Italy on Thursday.

For a second year running, Ukrainian President Volodymyr Zelenskiy will attend the summit, taking part in talks on Thursday, and he is due to sign a new, long-term security accord with U.S. President Joe Biden.

The G7 leaders look likely to announce they have agreed at least in principle on plans to issue $50 billion of loans for Ukraine using interest from Russian sovereign assets frozen after its invasion of Ukraine to back the multi-year debt package.

"I think we will have the major tentpoles of this decided, but some of the specifics left to be worked through by experts on a defined timetable," White House National Security Advisor Jake Sullivan said of the discussions.

"I think we are on the verge of a good outcome here," he added.

Officials acknowledge the plan is complex, with legal experts still having to thrash out the details that will need the backing of European nations, particularly Belgium, which is not in the G7.

PACKED AGENDA

With the Middle East, migration and artificial intelligence also on a packed agenda, the June 13-15 summit in the southern Italian region of Puglia would be taxing for leaders at the best of times, but most of them are also bowed down by their own domestic woes.

Only the host, Italian Prime Minister Giorgia Meloni, is riding high after triumphing in Italy's European election last weekend, but achieving meaningful results in the luxury Borgo Egnazia hotel resort will be a tall order.

Biden's goal at the G7 was to reinforce the idea that the United States is best served if it is closely aligned with its democratic allies and partners, Sullivan said, when asked about the prospects of it being the president's last summit given he faces a re-election battle in November.

Underscoring U.S. determination to punish Moscow for its 2022 invasion of Ukraine, Washington on Wednesday dramatically broadened sanctions on Moscow, including by targeting China-based companies selling semiconductors to Moscow.

By announcing new restrictions on Chinese firms on the eve of the G7 meeting, Biden is no doubt hoping to persuade Western allies to show greater resolve in confronting Beijing over its support for Russia and its industrial over-capacity.

Speaking ahead of the start of the summit, Sullivan said that China was a significant creditor to many heavily indebted countries.

"The G7 communique is not singling out or focusing on a single country," he said, but added that China needed to play a constructive role in dealing with the debt burden. (Reporting by Crispian Balmer, Angelo Amante, Andrew Gray, Andrea Shalal and John Irish Writing by Crispian Balmer and Keith Weir Editing by Christina Fincher)