Nearly 400 people have been sentenced in Nigeria for links with militant Islamic groups following mass trials. The convicts were given sentences ranging from five years to life imprisonment after being linked to Boko Haram or a rival splinter group, the Islamic State West Africa Province (Iswap). The trials came at a time when the government is under intense pressure to curb rising insecurity in Africa's most-populous state. Security forces are battling multiple armed groups, from militant Islamists to separatists and kidnapping-for-ransom gangs.

Boko Haram launched an insurgency in the north-east in 2009, killing tens of thousands of people and displacing more than two million, according to aid groups. In response to the deteriorating security situation, the US has urged its citizens to reconsider travel to Nigeria.

More than 500 suspects were put on trial in the federal high court in the capital, Abuja, on charges of either taking part in attacks or supporting the militants through funding, supplying arms, or logistical support. On Friday, judges convicted 386 of them, while two were acquitted, eight were discharged, and the cases of 112 suspects were adjourned.

Five of the accused had pleaded guilty at the start of the trials to charges that included selling livestock, supplying food, and information to the militant groups. The government has stressed that the violence affects people of all faiths and does not discriminate based on religion.