Johannesburg: South Africa's much-loved former president Nelson Mandela had to be admitted to a hospital for what was described as a "longstanding" problem, but officials tried to calm any concerns over the 93-year-old's health, saying he was in "good spirits".

The anti-apartheid hero's health has witnessed a decline in recent years, and this is the second time in two years that he has had to be admitted.

Officials said he was taken to hospital overnight for a "long-standing abdominal complaint" which needed "proper specialist medical attention".

But presidential spokesman Mac Maharaj said that Mandela "is in good spirits and well".

He was admitted to the hospital this morning.

According to sources, the former president has likely undergone a surgery but a spokesman for the African National Congress (ANC) said it was a check up and there's "no operation involved."

In a statement, President Jacob Zuma's office said the "love and good wishes of all South Africans and people throughout the world" were with Mandela, and asked for his family to be given privacy.

"Madiba has had a long-standing abdominal complaint and doctors feel it needs proper specialist medical attention," the statement said.

In South Africa, Mandela is affectionately referred to as Madiba, his clan name.

ANC spokesman Keith Khoza said the leader had abdominal pains for some time and it was decided that receive attention of specialists. However, he added that it was not an emergency admission.

Last year in January, Mandela was admitted to hospital for a serious chest infection, and his admittance sparked lot of rumours and speculation.

This time, the officials have stepped in to make sure there is no panic.

Khoza said that further information would be released once Zuma and the Mandela family receive a full medical report from doctors, but that the 93-year-old's life was not in danger.

Mandela, who led South Africa's anti-apartheid movement, spent 27 years in prison till 1990, and became South Africa's first black president in 1994.

He stepped down after one term and retired from public life eight years ago.