The doctors of former former South African president and anti-apartheid icon Nelson Mandela doctors have rejected the idea of turning off his life support unless he suffers massive organ failure, a family friend says.

Denis Goldberg, an anti-apartheid activist who has been Mr Mandela's friend for more than half a century, said the issue of turning off life support was discussed and ultimately dismissed.

"I was told the matter had been raised and the doctors said they would only consider such a situation if there was a genuine state of organ failure," Mr Goldberg said.

"Since that hasn't occurred they were quite prepared to go on stabilising him until he recovers."

Mr Goldberg, 80, was convicted along with Mr Mandela in 1964 for their fight against white-minority rule. He visited the former president in hospital on Monday.

A court document filed by a lawyer for Mr Mandela's family nine days ago stated the 94-year-old was "assisted in breathing by a life support machine".

"The Mandela family have been advised by the medical practitioners that his life support machine should be switched off," the court filing read.

"Rather than prolonging his suffering, the Mandela family is exploring this option as a very real probability."

The document - which was designed to press a court to urgently settle a family row over the remains of Mr Mandela's children - also stated that Mr Mandela was "in a permanent vegetative state".

South Africa's presidency has stated that is not now the case, but has refused to give further details of his condition, citing the need to respect Mr Mandela's privacy.

On the day the document was drafted, president Jacob Zuma abruptly cancelled a trip to Mozambique to confer with Mr Mandela's doctors amid fears the icon may be close to the end.

Presidential spokesman Mac Maharaj told AFP on Friday that Mr Zuma's office "had not been party" to the court material and would not speculate on its content.

"We did not file any document and we are not saying that it's true or not true," he said.

Mandela 'clearly very ill' but conscious

Earlier Mr Goldberg said Mr Mandela was "clearly a very ill man, but he was conscious and he tried to move his mouth and eyes when I talked to him".

"He is definitely not unconscious ... he was aware of who I was," he said.

Mr Mandela, who spent 27 years in prison for fighting white-minority rule and went on to lead the process of racial reconciliation as South Africa's first black president, has now spent a month in hospital after being admitted with a recurrent lung infection.

South Africa's parliament on Friday hosted a prayer service in a Cape Town cathedral where Mandela was hailed as "an icon of a truly free South Africa".

"It is a reflective period for our people," said national assembly deputy speaker Noma Indiya Mfeketo.

"The thought of Madiba in hospital indisposed due to illness is harrowing," she said, referrring to Mr Mandela by his Xhosa tribe name.