It came two weeks after Boko Haram had overrun the same town, driving out Nigerian soldiers and signaling its re-emergence as a force capable of capturing army bases. The bloodshed is a challenge for President Muhammadu Buhari in particular as he seeks a second successive four-year term in an election on Feb. 16, having been elected in 2015 partly on a promise to restore security. A Nigerian army spokesman denied that troops had left the town and that Boko Haram had killed the people.