The foreigners released included two Britons and a Moroccan who had been sentenced to death in June after being captured fighting for Ukraine. Also freed in the deal brokered by Saudi Arabia, according to a Saudi ministry, were three other Britons, two Americans, a Croatian, and a Swedish national.