Nigeria's new President Bola Tinubu, sworn in on Monday, has promised to unite Africa's most populous nation and tackle insecurity as "top priority".
The 71-year-old succeeds 80-year-old former Army General Muhammadu Buhari of the same party, who stepped down after two terms in office, leaving a country facing a sea of economic troubles and security challenges.
"As president of the Federal Republic of Nigeria I will discharge my duties and perform my functions honestly to the best of my ability, faithfully and in accordance with the constitution," Mr. Tinubu said in a live broadcast from the capital Abuja's Eagle Square.
Foreign leaders and representatives present at the ceremony included presidents Cyril Ramaphosa of South Africa, Paul Kagame of Rwanda and Nana Akufo-Addo of Ghana as well as delegations from the U.S., Britain and China.
Kashim Shettima was sworn in as Vice President, taking over from Yemi Osinbajo.
The ruling party duo were declared winners of a February 25 election, gaining the highest number of votes and picking up the required number of ballots across two-thirds of Nigeria's states.
But Mr. Tinubu only garnered just over a third of the total vote, leaving him with a weak mandate, some analysts say.
The poor showing reflects "widespread disenchantment with his party's record... along with misgivings about his personal eligibility for the office," the International Crisis Group (ICG) think tank said in a note.
Opposition leaders are contesting results in court, claiming fraud.
In his inaugural speech, Mr. Tinubu, known in Nigeria as a political "godfather" and former kingmaker, insisted he would work to unite the country.
"Whether from the winding creeks of the Niger Delta, the vastness of the northern savannah, the boardrooms of Lagos, the bustling capital of Abuja, or the busy markets of Onitsha, you are all my people," Mr. Tinubu said.
"As your President, I shall serve you with prejudice toward none but compassion and amity towards all."
Buhari, who Tinubu has bragged he helped put into power in 2015, promised to tackle graft and insecurity while in office but disappointed many.
He bequeaths his successor mounting debt and inflation, as well as deepening concern over incessant attacks and kidnappings by armed groups.
The outgoing president left Abuja on Monday to spend time at his farm in Daura, in Katsina State, near the border with Niger.
Addressing a crowd wearing a traditional attire, Tinubu promised to address widespread violence that occurs almost daily across the country.
"Security shall be the top priority of our administration because neither prosperity nor justice can prevail amidst insecurity and violence," he said.
Troops are currently battling gangs of heavily armed criminals and kidnappers in central and northwestern states, oil thieves, pirates and separatists in the southeast, and a 14-year-old jihadist insurgency in the northeast.
Tinubu also reiterated some of his campaign promises to fix a sickly economy, including removing costly fuel subsidies.
Oil-rich Nigeria swaps crude worth billions of dollars for gasoline that it then subsidises for its domestic market.
This has caused a huge drain on revenue and foreign exchange, contributing to ballooning debt.
More than 80 million of the country's estimated 210 million people live below the poverty line, according to the World Bank, and the United Nations has warned that over of a quarter of those are facing acute hunger this year.
Despite thriving tech and entertainment sectors, many middle-class Nigerians are moving abroad hoping for a brighter future.