Gangs have been terrorising areas of northern Nigeria in recent years, forcing thousands to flee and perpetrating mass kidnappings for ransom.
A resident called police in the early hours of Sunday, spokesman Lawan Shiisu Adama said in a statement, after the assailants entered the town of Kwalam and took a 60-year old.
Two officers were shot dead and a patrol vehicle set ablaze in the ensuing firefight, after which the gunmen fled.
(Reporting by Camillus Eboh; Writing by Chijioke Ohuocha; Editing by Andrew Cawthorne)