Johannesburg, Jan 27 (Agencies): Nelson Mandela, the anti-apartheid hero, was in hospital for "routine" tests on Wednesday but his health was not in jeopardy, said the former South African President's foundation in a statement.

"He is in no danger and is in good spirits," the foundation said, confirming that he attended Milpark hospital in Johannesburg.

The hospital declined to comment on whether Mandela would be staying in hospital overnight, saying it does not give information on patients as a matter of policy.

Mandela, South Africa's first black President, is increasingly frail and has not appeared publicly since the closing ceremony of the 2010 FIFA World Cup in Johannesburg.

After his withdrawal from public life in 2004, he created the Nelson Mandela Foundation, the Nelson Mandela Children's Fund and the Mandela Rhodes Foundation to continue humanitarian work on his behalf.