A military court in Somalia has sentenced six Islamic State fighters from Morocco to death.
The men will be executed by a firing squad if their appeal, which they have one month to file, is unsuccessful.
"They came to Somalia to support Isis [IS} and destroy and shed blood," the court's deputy chairman, Col Ali Ibrahim Osman, told VOA Somali.
The men's lawyer said they had been misled into joining IS and were seeking to be deported to Morocco.
It is the first time authorities in the semi-autonomous Puntland region have charged or sentenced foreigners for joining IS.
The military court also gave an Ethiopian and a Somali 10-year prison sentences each, while freeing another Somali defendant due to insufficient evidence.
One of the prosecutors told BBC Somali that the militants were arrested in the Cal-Miskaat mountains, east of Bosaso, Puntland's commercial hub.
The mountains are a stronghold of Islamic State, which has a base there.
The Somali branch of IS was formed in 2015 by a group of defectors from the al-Qaeda affiliated al-Shabab group - the largest jihadist group in Somalia.
It is notorious for extorting locals and mainly carries out small-scale, sporadic attacks, according to the US Office of the Director of National Intelligence.
Somalia typically issues the death penalty for crimes connected to terrorism.
The practice has been condemned by several local and international human rights groups, including The Coalition of Somali Human Rights Defenders.
Last month, the coalition and other rights groups said in a report that Somalia had carried out at least 55 executions last year.
It said that 23 of the executions done last year were carried out by military authorities in Puntland and Somalia's capital, Mogadishu.