The ceremony took place in the presidential villa in Abuja
Nigeria's acting President Goodluck Jonathan has been sworn in as head of state following the death of President Umaru Yar'Adua after a long illness.
Mr Jonathan, in charge since February, will appoint a deputy and serve out the rest of the current presidential term until elections due next year.
Mr Yar'Adua died late on Wednesday in the capital Abuja.
Thousands attended the funeral in his home town of Katsina. Nigeria has declared seven days mourning.
Mr Jonathan took the oath of office in front of government ministers and other officials in Abuja almost 12 hours after Mr Yar'Adua died. The ceremony was performed by Chief Justice Alloysius Katsina-Alu.
AT THE SCENE
Ahmed Idris, BBC News, Katsina
Tens of thousands of men shoved and pushed their way into the stadium in Katsina to pay their respects to Nigeria's later President Umaru Yar'Adua.
Chants of "Allahu Akbar" (God is great) began as his body - on a bamboo stretcher and wrapped in a Nigerian white and green flag - was carried in by military men.
Former military ruler Muhammadu Buhari and Ibrahim Babangida were among the mourners. Other dignitaries included Niger's interim prime minister. There was also a government delegation, but Mr Yar'Adua's deputy, newly sworn-in President Goodluck Jonathan, was not among them.
Security was tight during the prayers, which lasted about 30 minutes in the 40 degree heat; and the mood was sombre as the body was removed to the cemetery for a burial mainly attended by those close to the late president.
Afterwards he made a brief address, saying his administration was committed to pursuing electoral reform and the fight against corruption "with greater vigour".
"While this is a major burden on me, and indeed the entire nation, we must - in the midst of such great adversity - continue to gain our collective efforts towards upholding the values which our departed leader represented," Mr Jonathan said.
He added: "One of the true tests will be that all votes count, and are counted, in our upcoming presidential election."
The BBC's Karen Allen says that all eyes will now be on the figure President Jonathan - who is from the largely Christian south - appoints as his deputy.
By tradition the presidency alternates between the mainly Muslim north and the south, and whomever he selects is likely to be seen as the presidential candidate for the ruling People's Democratic Party (PDP), she says.
The north is due another presidential term, however some analysts believe that Mr Jonathan could still strengthen his political power base, defy political convention and run for office himself.
Mr Yar'Adua, who was 58, was buried in a Muslim ceremony in Katsina state.
Businesses and shops closed down as a sign of respect.
Born in northern Katsina state in 1951
University chemistry professor before entering politics
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.