Nigeria president Umaru Yar'Adua has died, an official at his office confirmed.

The president of Africa's most populous nation died after more than five months of battling with a heart ailment.

According to local media, he died between 9:30 and 10:30 pm (2030 and 2130 GMT) Wednesday.

Nigeria's Acting President Goodluck Jonathan, who will be sworn in as the new president, declared seven days of mourning and expressed shock at the death of his predecessor.

Jonathan received the news with "shock and sadness" his spokesman Ima Niboro told reporters.

Yar'Adua would be buried in his northern Katsina State on Thursday, which had been declared a work-free day, he added. During the mourning period, Nigerian flags would be flown at half-mast.

In neighbouring Benin, President Boni Yayi paid tribute to Yar'Adua.

"With the loss of this great statesman... Benin, my country, loses a great friend and I am very upset," he told AFP.

Heart condition

The president flew to Jeddah, Saudi Arabia last November for treatment for a heart condition and after three months, amid growing concern at the power vacuum, parliament finally handed power to his deputy Goodluck Jonathan.

Since his return to Nigeria in February, Yar'Adua, 58, had not been seen in public, nor was any information released as to the state of his health.

Christian and Muslim leaders who visited the ailing president in April would give no details of his condition.

But there was constant tension between his supporters and those of Jonathan.

On March 17, Jonathan sacked the entire Yar'Adua-formed cabinet, and last month swore in his own team with less than half of its members drawn from the old government.

With Yar'Adua's death, Jonathan automatically becomes the substantive head-of-state of one of the world's leading oil producers, and as such can complete the late president's term of office, which expires in May 2011.

The acting president has already promised to ensure free and fair elections but has not said much about his own political plans.

Difficult time

Yar'Adua's death comes at a difficult time for Africa's most populous nation.

Muslim-Christian violence erupted in central Nigeria earlier this year in which hundreds of people were killed, and there has been renewed unrest in the oil-rich Niger Delta.

Yar'Adua was recognised for his honesty in the corruption-ridden west African country.

Yar'Adua was Nigeria's third-elected civilian president and the first elected president to die in office.

-AFP