The president has had a chronic kidney condition for at least 10 years
Nigerian President Umaru Yar'Adua has a heart condition, his spokesman has said, after he flew to Saudi Arabia on Monday for medical treatment.
Mr Yar'Adua has acute pericarditis, or inflammation of the lining around the heart, his spokesman told the BBC.
He said the president, 58, was responding well to treatment. Officials earlier denied rumours that the president was seriously ill.
Mr Yar'Adua has had a chronic kidney condition for at least 10 years.
He has been unable to perform a number of official duties because of recurring health problems.
President Yar'Adua has twice been flown to Germany for emergency treatment and it is the second time he has visited hospitals in Saudi Arabia.
He has refused to say exactly what condition he suffers from, and has repeatedly said in interviews that his life is "in the hands of God".
BBC health reporter Michelle Roberts says most cases of pericarditis clear up with rest and medication within a few weeks, although patients will initially need to be treated in hospital to check for complications.
Our reporter says occasionally pericarditis is triggered by cancer, which is something doctors need to check for.
Rarely patients may need surgery if the pressure around the heart becomes too great, a complication that could potentially be fatal, she adds.
Born in 1951 in the northern Muslim state of Katsina
Self-confessed Marxist as an undergraduate
Became a chemistry teacher after university
Married twice, has nine children
Governor of Katsina from 1999 to 2007
During his governorship Katsina adopted Sharia law
Nickname since becoming president in 2007 - "Baba-go-slow"
High point of his presidency so far - the amnesty for oil militants
Has suffered from a chronic kidney condition for at least 10 years
Presidential spokesman Olusegun Adeniyi said the president felt pains after performing Friday prayers last week.
"At about 3pm Friday November 20, after he returned from the Abuja Central Mosque where he performed Muslim prayer, President Yar'Adua complained of a left-sided severe chest pain," he said, reports Reuters.
Mr Adeniyi said the initial diagnosis was pericarditis, which has since been confirmed.
Officials had earlier been quoted as saying the president intended to make the Hajj pilgrimage to Mecca this week.
Analysts say his continued ill-health poses a problem for Nigeria's constitution.
If he were to step down or die, he would be replaced by Vice-President Goodluck Jonathan, who is from the country's southern Niger Delta region.
But according to the ruling People's Democratic Party's own formula for sharing power among the country's regions, the president must be a northerner.