Former Nigerian president Goodluck Jonathan (left) shakes hands with his successor Mohammadu Buhari after handing over power during a ceremony at Eagles Square in Abuja, on May 29, 2015
Abuja (AFP) - Muhammadu Buhari was sworn in as Nigeria's new president on Friday, vowing to tackle the country's many problems "head on", including Boko Haram, at a ceremony rich with military pomp and cultural tradition.
A 21-gun salute rang out across the capital, Abuja, after he took the oath of office before the chief justice of Nigeria to begin a four-year term beset with difficulties from the outset.
The new leader, dressed in flowing white robes traditional in his native Muslim-majority north, said he belonged "to everybody... and to nobody" and acknowledged the "enormous challenges" ahead.
But he told the crowd: "We are going to tackle them head on... We must not succumb to hopelessness and defeatism. We can fix our problems."
He added: "The new government is basking in a reservoir of goodwill and high expectations... We have an opportunity. Let us take it."
The devout Muslim also called Boko Haram "a mindless, godless group who are as far away from Islam as one can think of", while pledging efforts to free hostages, including the girls kidnapped from their school in Chibok last year.
Armed services personnel in ceremonial dress filed past to a marching band, marshalled by officers on horseback, and Buhari toured the venue in an open-topped presidential jeep, waving and clenching his right fist in a traditional Hausa greeting.
The former military ruler -- Nigeria's second after Olusegun Obasanjo to become elected president -- faces several crises, from severe economic turmoil to Boko Haram's still-raging insurgency.
- 'Enormous challenges' -
The inauguration, before past Nigerian leaders and serving heads of state from across the continent, comes 32 years after he seized power in a military coup.
Before taking the oath, he shook hands with the elected president he ousted in 1983, Shehu Shagari, and the general who deposed him 20 months later, Ibrahim Babangida.
Buhari has described himself as a "converted democrat" and vowed to lead an administration committed to the needs of Nigeria's 173 million people by cracking down on the scourge of corruption.
His election victory on March 28 was the first time in Nigeria's history that an opposition candidate had defeated a sitting president and has been hailed as a watershed for democracy.
There are high hopes for his stewardship of Africa's most populous nation, which has struggled for decades with woeful infrastructure, crippling unemployment and widespread unrest.
- Corruption, economic crisis -
"People are very happy. Nigerians both inside and outside the country have tremendous expectations from this new government," said businessman Chambers Okorie.
"We are looking forward to seeing the reality of this change he has professed," he added, expressing hope Buhari can end decades of religious and ethnic division that have blighted the nation.
Nigeria is Africa's top oil producer and leading economy, but plunging oil prices have caused a cash crunch, weakening the naira currency to historic lows and forcing state projects to be shelved.
Buhari and his All Progressives Congress Party have pledged sweeping change, particularly in job creation, boosting infrastructure, electricity supply and insecurity.
But with the public coffers in tatters, Buhari's ability to deliver on campaign promises may be limited in the short term.
Research and investment firm Renaissance Capital said Buhari's government would be "substantially resource-constrained" and his biggest challenge would be managing high expectations.
- Insurgency -
Buhari won the support of voters largely through his tough stance against corruption. His previous time in charge was characterised by a crackdown on graft and "indiscipline".
He said his administration would have zero tolerance for corruption but experts warn that maintaining his fragile coalition could involve working with some politicians who have a mixed past.
Buhari enjoys massive support in the north.
But he almost certainly would have lost without the backing of partners from the predominately Christian south, including ex-PDP heavyweights who have been linked to graft.
Cabinet appointments, due in the coming days, will be closely watched.
Buhari on Friday renewed his pledge to end the Boko Haram insurgency, which has claimed at least 15,000 lives since 2009 and made some 1.5 million people homeless.
Gains have been made since February in an offensive backed by neighbouring Cameroon, Chad and Niger but violence persists and sustained pressure is required to defeat the resilient Islamists.
Buhari said the military's operational command centre would be shifted from Abuja to Maiduguri, the capital of Borno state worst hit by the violence.
All efforts would be made to rescue the 219 girls kidnapped from their school in Chibok in April 2014 and hundreds of other hostages held by the group, he added.
Containing unrest in the southern, oil-producing Niger Delta may prove to be just as tough a problem, with former militants threatening to resume violence.
A 2009 government amnesty programme that saw oil rebels swap guns for regular cash stipends has significantly reduced unrest but the scheme expires at the end of this year.
Buhari recognised the fact but added: "The government intends to invest heavily in the projects and programmes currently in place."