In 2017, an Islamic extremist group linked to ISIL named "Ansar al-Sunna" attacked the city during the Insurgency in Cabo Delgado, killing 17 people. Another attack took place on March 24, 2020, which briefly gave the militants control of the city before they were driven out by the Mozambique Defence Armed Forces. Islamist insurgents took control of the city on August 12, 2020, after defending government forces ran short of ammunition and evacuated, some by sea. Efforts to retake the city from militants were launched immediately. In August of 2021 these efforts were successful and a combination of Rwandan and Mozambican forces retook the city.