According to the terms of the POWs exchange, they had to be held on the territory of the neutral state, while lowe-rank officers and soldiers were exchanged directly between Ukraine and Russia.
Five servicemen who returned to Ukraine on 8 July 2023 are commanders of the Azov regiment Denys Prokopenko, Sviatoslav Palamar, and Oleh Khomenko, commander of the 36th Separate Marine Brigade Serhiy Volynskyi, and commander of the 12th brigade of Ukraine’s National Guard Denys Shleha.
They all returned to Ukraine together with Ukraine’s President Volodymyr Zelenskyy, who was on a working visit to Türkiye on 8 July 2023.
Five Ukrainian commanders who were defending Mariupol have just returned to Ukraine from Turkey together with Ukraine's President Zelenskyy
After Mariupol was occupied on 20 May 2022, they spent four months in Russian captivity and then were transferred to a third country as… pic.twitter.com/VerRjUCiPQ
— Euromaidan Press (@EuromaidanPress) July 8, 2023
The return of Ukrainian commanders to Ukraine became “the result of negotiations with the Turkish side,” according to the Ukrainian Presidential Office.
In total, nearly 2500 Ukrainian servicemen surrendered to Russian captivity from the besieged Azovstal factory in Mariupol. Ukrainian authorities said the conditions of the surrender were agreed and indeed, 500 POWs were exchanged in the coming months, including the five top commanders. However, nearly 2000 Azovstal defenders still remain in Russian captivity. It remains unclear which were the conditions of the surrender and what of them Russia fulfilled.
UPDATE: Putin’s spokesman Dmitry Peskov said that Türkiye’s decision to allow Ukrainian commanders to return to Ukraine is “a violation of agreements,” both by Turkiye and Ukraine. He also complained that nobody informed Russians about this decision, saying that Ukrainian commanders exchanged from Russian captivity had to stay in Turkiye “until the end of the war.”