Nigeria's Goodluck Jonathan has been sworn in as president for a new four-year term, following a clear poll win.
Foreign heads of state attended the lavish ceremony, which began with a military parade and inspection at Eagle Square in the country's capital, Abuja.
Mr Jonathan was promoted from vice-president after Umaru Yar'Adua died in office in 2010.
Despite his election win the country still has serious divisions and there were deadly riots after polling.
The election was largely considered free and fair but hundreds of people were killed in three days of rioting following the announcement of the result.
Mr Jonathan, 53, won nearly 60% of the vote.
He is a southern Christian and had defeated his leading challenger from the mainly Muslim north.
Mr Jonathan's nomination also required changing a ruling party tradition of alternating between candidates from the north and south.
The BBC's Jonah Fisher in Abuja says the pressure is now on the winner to deliver on his many election promises.
Mr Jonathan is famous for his wide-brimmed hat - on display on inauguration day - and his love of Facebook, but enters office with a "to-do" list that would daunt many, he adds.
On the campaign trail Mr Jonathan said fixing Nigeria's threadbare power sector would be a priority as would be reforming agriculture to increase food production.
Our correspondent says President Jonathan will not have to perform miracles to be hailed as a success - given the country's history of mismanagement and corruption most Nigerians would gladly accept some firm steps in the right direction.
Mr Jonathan will face the issue of continuing Christian-Muslim conflict and the simmering tension in the oil-producing Niger Delta
To win at the first round, a candidate not only needs the majority of votes cast, but at least 25% of the vote in two-thirds of Nigeria's 36 states. Goodluck Jonathan, of the PDP, reached that threshold in 31 states; runner-up Muhammadu Buhari of the CPC only did so in 16 states.
Nigeria's 160 million people are divided between numerous ethno-linguistic groups and also along religious lines. Broadly, the Hausa-Fulani people based in the north are mostly Muslims. The Yorubas of the south-west are divided between Muslims and Christians, while the Igbos of the south-east and neighbouring groups are mostly Christian or animist. The Middle Belt is home to hundreds of groups with different beliefs, and around Jos there are frequent clashes between Hausa-speaking Muslims and Christian members of the Berom community.
Despite its vast resources, Nigeria ranks among the most unequal countries in the world, according to the UN. The poverty in the north is in stark contrast to the more developed southern states. While in the oil-rich south-east, the residents of Delta and Akwa Ibom complain that all the wealth they generate flows up the pipeline to Abuja and Lagos.
Southern residents tend to have better access to healthcare, as reflected by the greater uptake of vaccines for polio, tuberculosis, tetanus and diphtheria. Some northern groups have in the past boycotted immunisation programmes, saying they are a Western plot to make Muslim women infertile. This led to a recurrence of polio, but the vaccinations have now resumed.
Female literacy is seen as the key to raising living standards for the next generation. For example, a newborn child is far likelier to survive if its mother is well-educated. In Nigeria we see a stark contrast between the mainly Muslim north and the Christian and animist south. In some northern states less than 5% of women can read and write, whereas in some Igbo areas more than 90% are literate.
Nigeria is Africa's biggest oil producer and among the biggest in the world but most of its people subsist on less than $2 a day. The oil is produced in the south-east and some militant groups there want to keep a greater share of the wealth which comes from under their feet. Attacks by militants on oil installations led to a sharp fall in Nigeria's output during the last decade. But in 2010, a government amnesty led thousands of fighters to lay down their weapons.