Officials in north-western Nigeria say criminal gangs have killed 17 members of the security forces and two civilians in a series of attacks.
They said the gunmen raided five towns and set fire to a number of military camps in the Sabon Birni area of Sokoto state.
Many people have fled into neighbouring Niger.
The government recently cut telecommunications services in the area, saying this would help fight insecurity.
The authorities say they are recruiting vigilantes to help protect people from the criminals.