JOHANNESBURG (AP) — Nelson Mandela is being kept alive by a breathing machine and faces "impending death," court documents show.

The former president's health is "perilous," according to documents filed in the court case that resulted in the remains of his three deceased children being reburied Thursday in their original graves.

"The anticipation of his impending death is based on real and substantial grounds," the court filing said.

Mandela, who was hospitalized on June 8, remains in critical but stable condition, according to the office of President Jacob Zuma, who visited the anti-apartheid leader on Thursday. The president's office also said doctors denied reports that 94-year-old Mandela is in a "vegetative state."

A younger person put on mechanical ventilation — life support — can be weaned off the machine and recover, but that it can be difficult or impossible for an older person. The longer a person is on ventilation the less the chance of recovery, said the chief executive of the Faculty of Consulting Physicians of South Africa.

"It indicates a very poor prognosis for recovery because it means that he's either too weak or too sick to breathe on his own," said Dr. Adri Kok, who has no connection to Mandela's care. "Usually if a person does need that, any person, not keeping in mind his age at all, for any person it would be indicative of a grave illness."

"When they say 'perilous' I think that would be a fair description," she said.

In Mandela's hometown, Qunu, on Thursday, the bodies of three of his children were returned to their original resting site following the court order.

Family members and community elders attended a ceremony on the Mandela property that included the singing of hymns. The reburial took place in Qunu, where Mandela grew up and where the former president has said he wants to be buried. Forensic tests earlier confirmed the remains were those of Mandela's children.

Grandson Mandla Mandela moved the bodies to his village of Mvezo — Nelson Mandela's birthplace — in 2011. The two towns are about 25 kilometers (15 miles) apart. Fifteen Mandela family members pursued court action last week to force the grandson to move the bodies back to their original burial site.

Story continues

Mandla Mandela — the oldest male Mandela heir and a tribal chief — told a news conference on Thursday that his grandfather "would be highly disappointed in what is unraveling."

Retired archbishop Desmond Tutu appealed to the family of Mandela, also known by his clan name Madiba, to overcome their differences.

"Please, please, please may we think not only of ourselves. It's almost like spitting in Madiba's face," Tutu said in a statement released by a foundation he leads. "Your anguish, now, is the nation's anguish — and the world's. We want to embrace you, to support you, to shine our love for Madiba through you. Please may we not besmirch his name."

Mlawu Tyatyeka, an expert on the Xhosa culture of Mandela's family, said the court case over the graves was decided quickly because the family knows that Mandela will soon die.

"It's not a case of wishing him to die. It's a case of making sure that by the time he dies, his dying wish has been fulfilled," he said. "We have a belief that should you ignore a dying wish, all bad will befall you."

Meanwhile, Mandela's wife said the former president is sometimes uncomfortable but seldom in pain while being treated in a hospital.

Graca Machel spoke about her husband's condition at a fundraising drive for a children's hospital that will be named after Mandela.

"Whatever is the outcome of his stay in hospital, that will remain the second time where he offered his nation an opportunity to be united under the banner of our flag, under the banner of our constitution," she said.

Mandela was imprisoned for 27 years during white racist rule and was freed in 1990 before being elected president in all-race elections. He won the Nobel Peace Prize along with former President F.W. de Klerk.

___

Associated Press reporters Christopher Torchia and Carley Petesch in Johannesburg contributed to this report.