Maiduguri (Nigeria) (AFP) - Nigeria's military on Saturday repelled a Boko Haram attack on the key northeastern city of Maiduguri, hours after President Muhammadu Buhari took office vowing to crush the Islamist group.

The overnight attack on the Borno state capital saw rocket-propelled grenades fired into homes in a bombardment that reportedly lasted several hours.

The fighting was most heavily concentrated in the Dala suburb to the south of the city.

"It was a nightmare," Dala resident Malam Yusuf told AFP. He said his own home was hit and his wife's foot was "blown off."

"RPGs kept flying and falling on homes," he said.

While some residents recounted bodies being removed from targeted homes, no one was able to provide a precise death toll and emergency workers in Borno were not available to comment.

In his inaugural speech after taking the oath of office on Friday, Buhari described Nigeria's Islamist rebels as a "mindless" and "godless" group that would ultimately be destroyed.

He announced plans to reinforce Maiduguri with a new command and control centre to better coordinate the counter-insurgency effort, a move analysts said signalled his commitment to intensifying the fight.

It was not clear if Boko Haram's fresh assault on the strategically crucial city was timed to come hours after the inauguration.

But the new president will likely be tested repeatedly in the coming months by a militant group that has proved resilient over its six-year uprising.

- Midnight assault -

Shortly after midnight (2300 GMT Friday), residents in Dala woke to the sound of RPGs being fired in succession, resident Modu Karumi said, in an account supported by several others.

Witnesses said hundreds of Islamist gunmen were trying to advance on the city, which is now home to hundreds of thousands of people displaced by unrest in other parts of Borno state.

Maiduguri-based vigilante Babagana Bulunkutu said the RPGs fell on homes "while residents were sleeping."

Story continues

"Five houses were destroyed," and Islamist gunmen fired indiscriminately in Dala and two neighbouring suburbs, Bulunkutu said.

An AFP reporter who lives in the area said he heard what sounded like armoured personnel carriers deploying to the southern edge of the city to face the rebel advance.

Three senior security sources in Maiduguri who were not authorised to speak publicly said the attack had been repelled.

"All is under control. There is no cause for alarm," one of those sources told AFP.

The sound of RPGs and gunfire had also eased, residents and an AFP reporter said.

Nighttime movement in Maiduguri is restricted by a 10:00 pm to 6:00 am curfew.

- New administration -

Experts doubt that Boko Haram currently has the capacity to seize Maiduguri, but a major attack inside the city would likely be disastrous for civilians.

The Islamist rebels have been flushed out of several Borno state towns they controlled in an offensive launched in February by Nigeria with backing from neighbouring Cameroon, Chad and Niger.

But there are signs of the militants regrouping, particularly in the remote parts of eastern Borno near the Cameroon border.

Buhari in his inaugural speech noted the successes of the four-nation offensive but said Boko Haram would not be defeated until operational command was shifted from the capital Abuja to Maiduguri.

"This denotes a more hands-on approach to the fight against Boko Haram," said Yan St-Pierre, head of the Modern Security Consulting Group, describing the move as "very sound."

Buhari's predecessor, Goodluck Jonathan, was heavily criticised for his performance against the militants, with the conflict killing more than 15,000 people since 2009 and forcing another 1.5 million from their homes.

Buhari indicated the uprising could have been contained in the early stages but flourished due largely to "official bungling, negligence (and) complacency."

Victims of the conflict, especially in the northeast, voted overwhelmingly for Buhari in March polls, in part because the ex-army general is seen as a strong commander-in-chief.