Five Britons were among nearly 300 people released in an overnight Russian-Ukrainian prisoner swap.
Three of them have been identified as Aiden Aslin, John Harding and Shaun Pinner, who were captured by Russian-backed separatists in eastern Ukraine in April.
In a personal message recorded on their flight home, Mr Aslin and Mr Pinner Thank you to those who worked to free them.
Mr Aslin said: “We are now out of the danger zone and on our way home to our family.
Mr. Pinner added: “Because of our teeth.
Mr. Aslin continued: “We just want everyone to know the good news. Thank you for your support. It is really appreciated.”
Most of those released were Ukrainians, many of them from the Azov regiment, which had become known for its staunch defense of the southeastern city of Mariupol.
For months, a small group of soldiers, including John Harding, along with a number of civilians, were locked in the Azovstal steel mills, with little food, medicine, ammunition or electricity.
They finally surrendered in May.
As well as the British, the 10 freed foreigners include Moroccan Brahim Saadoun, Americans Alexander Drueke and Andy Huynh, Croats and Swedes.
They were sent to Saudi Arabia, while many Ukrainians were sent back to Ukraine.
The prisoner swap was brokered with help from Turkey and Saudi Crown Prince Mohammed bin Salman, who has close ties to Russian President Vladimir Putin.
This seems to come as a surprise to many, coming as Mr. Putin has raised the bar in the war by threatening to use nuclear weapons.
Ukrainian President Volodymyr Zelenskyy said: “We remember all our people and try to save every Ukrainian.
“This is the meaning of Ukraine, our nature, this is what distinguishes us from the enemy.”
Zelenskyy said the most difficult negotiations revolved around the release of five senior Ukrainian commanders, including Lieutenant Colonel Denys Prokopenko, commander of the Azov battalion, deputy Svyatoslav Palamar and Serhiy Volynsky, commander of the 36th Marine Brigade. continental war.
Zelenskyy said the three were once leaders of the resistance in Mariupol and now they, along with two others who have not been named, will stay in Turkey until the war ends.
As part of the deal, Ukraine sent back 55 Russians and pro-Moscow Ukrainians, including Viktor Medvedchukleader of a banned pro-Russian party, who is facing treason charges.
Mr. Medvedchuk considers Mr. Putin a close friend – so close that he chose the Russian leader as godfather to one of his daughters.