Nearly 400 people have been sentenced in Nigeria for links with militant Islamic groups following mass trials. The convicts received sentences ranging from five years to life imprisonment for their ties to Boko Haram or its rival group, the Islamic State West Africa Province (Iswap).

These trials occurred amid mounting pressure on the Nigerian government to address rising insecurity in Africa's most populous nation, where security forces are engaged in combating multiple armed groups, including militant Islamists, separatists, and ransom-seeking gangs.

Boko Haram has waged an insurgency in northeastern Nigeria since 2009, resulting in tens of thousands of deaths and displacing more than two million people, according to aid organizations.

On Wednesday, the US recommended its citizens reconsider traveling to Nigeria due to the worsening security situation. More than 500 suspects were put on trial in the federal high court in Abuja for various charges, including participation in attacks and providing logistical support to militants.

On Friday, judges convicted 386 individuals, with two acquitted and eight discharged, while 112 cases were adjourned. Some of the accused admitted guilt early in the trials, confessing to charges involving support of the militant groups.

This crackdown is in response to the intensifying violence in Nigeria, where ongoing conflicts fueled by both jihadist and regional grievances continue to wreak havoc across the country.