Ukraine on Wednesday announced the exchange of a record-high 215 imprisoned soldiers with Russia, including fighters who led the defence of Mariupol's Azovstal steelworks that became an icon of Ukrainian resistance.

Russia received 55 prisoners including Viktor Medvedchuk, a former Ukrainian lawmaker and ally of Russian President Vladimir Putin accused of high treason, Ukraine's leader Volodymyr Zelensky said in his daily address.

The swap was the biggest exchange between the warring sides since the start of Russia's invasion in February.

Ten prisoners of war from countries including the United States and Britain were earlier on Wednesday transferred to Saudi Arabia as part of the exchange between Moscow and Kyiv, Zelensky said.

"We have managed to liberate 215 people," Ukraine's presidential chief of staff Andriy Yermak announced on television.

Zelensky said five military commanders including leaders of the defence of Azovstal were taken to Turkey as part of an operation prepared well in advance and agreed with Turkish President Recep Tayyip Erdogan.

The released prisoners will remain in Turkey "in total security and in comfortable conditions" until the end of the war, Zelensky added.

- 'Hugely welcome news' -

The Ukrainian forces' longstanding refusal to surrender at Azovstal despite shortages of ammunition and supplies earned them praise across the country for their heroism in defying overwhelming odds against Russia's superior numbers and firepower.

The prisoners of war transferred to Saudi Arabia comprised five British nationals, two Americans and one each from Morocco, Sweden and Croatia, according to a Saudi official briefed on the operation.

A Saudi statement said they had arrived in the kingdom from Russia and that Saudi authorities were "facilitating procedures for their safe return to their respective countries".

British Prime Minister Liz Truss said on Twitter that the release of the Britons was "hugely welcome news... ending months of uncertainty and suffering for them and their families".

Truss said they had been "held by Russian-backed proxies in eastern Ukraine", and thanked Zelensky and Saudi Arabia for helping free them.

MP Robert Jenrick on Twitter identified one of the British detainees as "my constituent" Aiden Aslin, who had been sentenced to death in June as an alleged mercenary after being captured by pro-Russian separatists.

Jenrick said the British detainees were "on their way back to the UK" and that Aslin's family "could finally be at peace".

The White House thanked Zelensky and Saudi Crown Prince Mohammed bin Salman for facilitating the exchange.

"We look forward to our citizens being reunited with their families," US National Security Advisor Jake Sullivan said in a statement on Twitter.

The Moroccan detainee is Brahim Saadoun, who was also sentenced to death in June by the unrecognised Donetsk People's Republic, according to a Moroccan official at the embassy in Riyadh.

Swedish Foreign Minister Ann Linde said on Twitter that the Swedish citizen, also held in Donetsk, "has now been exchanged and is well". She also thanked Ukraine and Saudi Arabia.

In Zagreb, the foreign ministry named the released Croat as Vjekoslav Prebeg, detained in April, and said he would return on Thursday, thanking Kyiv and Riyadh.

The releases came following efforts by Prince Mohammed, Saudi Arabia's de facto ruler, "in continuation of (his) commitment to the humanitarian initiatives towards the Russian-Ukrainian crisis", the Saudi statement said.

Video broadcast by the official Saudi Press Agency showed the 10 prisoners of war being greeted by Saudi officials as they descended from a plane in Riyadh, then being escorted into a room where they chatted with diplomats from their respective embassies.

- War tensions -

The war in Ukraine has fuelled tensions between Saudi Arabia and the United States, a critical ally for decades.

Saudi Arabia voted in favour of an early United Nations resolution to denounce Russia's invasion and demand that Moscow withdraw troops.

However, the kingdom has largely resisted US pressure to ramp up oil production to ease the energy crisis resulting from the war -- a campaign that included a visit by US President Joe Biden in July.

Instead Riyadh has coordinated with the OPEC+ oil cartel it jointly leads with Russia.