Boko Haram has launched a major offensive in Nigeria's northeastern city of Maiduguri and the town of Monguno, engaging in fierce battles with the military.
Al Jazeera's Yvonne Ndege, reporting from Abuja, the capital, said the army was claiming some success in its attempts on Sunday to stop the fall of Maidiguri, the largest city in Borno State, but local sources said that fighting was ongoing in some areas.
A member of the civilian joint task force (JTF), a vigilante group fighting Boko Haram, said at least 20 soldiers and 10 civilians had been killed in clashes in Maiduguri.
"There was also celebration and jubilation among some members of the military in certain areas where they have been able to repel attacks by the [Boko Haram] group," Ndege said.
Locals told the AFP news agency that Boko Haram fighters first attacked the Jintilo settlement, about 5km from Maiduguri, at around 04:00 GMT.
"Troops are repelling a simultaneous attack on Monguno and Maiduguri by terrorists," Nigeria's defence headquarters said on Twitter. It said a land and air operation against the group was ongoing.
Kerry arrives in Lagos
The fighting erupted as John Kerry, the US secretary of state, arrived in the country on Sunday and met with President Goodluck Jonathan and his chief rival candidate, former general Muhammadu Buhari, ahead of next month's presidential election.
"It is absolutely critical that this election can be conducted peacefully. The international community is paying very close attention to this election," Kerry said in Lagos.
Military sources told Al Jazeera that collaborators in the Nigerian army were most probably helping Boko Haram.
They said that many of the group's weapons were coming from the army and not from al-Qaeda in the Islamic Maghreb, which has a strong presence in neighbouring countries Chad, Niger, Mali, and Mauritania.
Fears have been growing for months about a possible strike on Maiduguri after the group began seizing towns and villages in three northeastern states about six months ago.
On January 3, they captured the fishing hub of Baga, in the far north of Borno State, which security analysts said put them in a better position to strike south Maiduguri, the state capital.
Maiduguri would be a major prize for the group, which is trying to carve out an Islamic state in the region.
The group control large parts of Borno State and some areas of neighbouring Adamawa and Yobe states.
Source: Al Jazeera and agencies