Government forces have struggled to contain the violence in Cabo Delgado province, relying on support from troops sent by Rwanda, South Africa and other regional partners.