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. TV broadcasts were interrupted with the news.
Seven days of national mourning have been announced.
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.
Mr Jonathan put on a sash bearing the green, yellow and white colours of Nigeria, signifying he had formally taken over as president.
Afterwards he made a brief address, saying his administration was committed to pursuing good governance, electoral reform and the fight against corruption “with greater vigour”.
“Having taken the oath of office, in line with the Nigerian constitution, under these very sad, unusual circumstances I urge fellow citizens to remain steadfast and committed to the values and aspirations of our nation,” he said.
“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.”
He added: “One of the true tests will be that all votes count, and are counted, in our upcoming presidential election.”
Mr Yar’Adua, who was 58, will be buried in a Muslim ceremony later on Thursday in his northern home state of Katsina, officials said.
Nigerian TV interrupted normal programming to announce the news in a brief statement early on Thursday.
The announcer said: “The president and commander-in-chief of the armed forces, Umaru Musa Yar’Adua, died a few hours ago at the presidential villa.
Government spokesman Olusegun Adeniyi said the president’s wife, Turai, was at his side when he died.
Shortly after Mr Yar’Adua’s death was announced, people began arriving at the residence to pay their condolences.
“Nigeria has lost the jewel on its crown and even the heavens mourn with our nation tonight,” Mr Jonathan said in a statement.
US President Barack Obama has led tributes from world leaders, praising Mr Yar’Adua’s profound personal decency and integrity” and his “passionate belief in the vast potential and bright future of Nigeria’s 150 million people”.
Zimbabwean Prime Minister Morgan Tsvangirai described it as “a great loss for Nigeria”.
Kenyan President Mwai Kibaki said Mr Yar’Adua “bequeathed upon the people of Nigeria and Africa at large a rich legacy of integrity”.
A statement from the militant group The Movement for the Emancipation of the Niger Delta said it considered Mr Yar’Adua “a genuine peacemaker whose initiatives, humility and respect began to bring confidence to the peace process”.
“His death may leave a vacuum that may not be filled,” the statement added.
Mr Yar’Adua’s election in 2007 marked the first transfer of power from one civilian president to another since Nigeria’s independence in 1960.
He promised a string of reforms in Africa’s most populous nation, including tackling corruption and reforming the inadequate energy sector and flawed electoral system.
Analysts say he made the most progress in tackling unrest in the oil-rich Niger Delta by offering amnesties to rebels.
He had been absent from the political scene since November, when he went to a hospital in Jeddah, Saudi Arabia, for several months.
During that time he was not heard from, apart from a BBC interview. He returned to Nigeria in February but remained too sick to govern.
A presidential spokesman said at the time that he was being treated for acute pericarditis, an inflammation of the lining around the heart.
His long absence and the lack of detailed information about his health led to a political limbo in Nigeria, which was only filled when Mr Jonathan was named as acting president.
However, there was constant tension between Mr Yar’Adua’s supporters, from the Muslim north, and those of Mr Jonathan, from the largely Christian south, and in March Mr Jonathan dissolved the cabinet and later put his own team in place.
The BBC’s Caroline Duffield in Jos, central Nigeria, says President Yar’Adua will be fondly remembered as a quiet and softly-spoken man whose integrity was respected.
But in his last months, it was clear he was too ill to take decisions himself.
His family and closest political advisers had faced severe criticism and were accused of using him to hold on to power, says our correspondent.