Militants launched a dawn raid on Jintilo village on the outskirts of the Borno State capital, prompting soldiers to respond with heavy weaponry and air support while the authorities to put the entire city on lock-down.
At the same time, Islamist fighters attacked Monguno, about 65 kilometres (40 miles) from the fishing town of Baga, where hundreds, if not more, people were killed in a devastating Boko Haram onslaught earlier this month.
It also demonstrated the uphill battle facing President Goodluck Jonathan, who was at a campaign rally for the February 14 election in Maiduguri on Saturday, where he again vowed to end the six-year insurgency.
Kerry was due to meet Jonathan and the main opposition's presidential candidate, former military ruler Muhammadu Buhari, in the financial capital Lagos.
More From This Section
The visit -- the first to Nigeria by a US secretary of state since Hillary Clinton in 2012 -- was announced on Friday during a speech in which Kerry warned of the dangers of Islamist extremists.
A senior US official told reporters travelling with Kerry that the insurgency, which is increasingly threatening neighbouring countries, would likely be raised with both candidates.
"We have been working very, very closely with the government of Nigeria to address Boko Haram, and I can say very clearly that no country has done as much as we have to support Nigeria's efforts," the official said.
But US involvement in Nigeria has been fraught, with criticisms in particular of the Nigerian government's slow response to the mass abduction of 276 girls from the town of Chibok in April last year.