Pretoria - A gravely ill 12-year-old Somali girl will receive the medical treatment she needs for a heart condition, including an operation, after a settlement was reached in the High Court in Pretoria on Friday.

Lawyers for Human Rights, acting on behalf of the girl's family in South Africa, launched an urgent application after she was allegedly turned away from the Steve Biko Hospital because she was undocumented and her family was unable to pay a R250 000 deposit.

The girl travelled unaccompanied through Kenya, Tanzania and Mozambique after leaving her home in Somalia on June 25.

She collapsed and was rushed to the Kalafong Hospital in Atteridgeville shortly after arriving in South Africa on July 4.

Health Minister Aaron Motsoaledi and Gauteng health officials on Friday reached a settlement agreement documenting that the girl had been admitted to Kalafong for treatment of a serious, pre-existing condition.

She was immediately admitted and treated by, among others, a paediatrician, who consulted with the cardio paediatrician at the Steve Biko Academic Hospital in Pretoria, and who supplemented the girl's treatment.

Although the girl's family said it was asked for a R250,000

deposit, health officials said they had fully investigated, but could find no substance in the allegation and denied it.

They also denied that doctors at Steve Biko hospital had refused to treat the child.

The girl's brother undertook to identify the staff members who demanded the deposit, and to retract the allegation if he failed to co-operate with the investigation.

The court was informed on Thursday that the girl had already been admitted to the Steve Biko Hospital.

The settlement, which was confirmed as a court order by Judge Andre Louw, made it clear that the girl would be subject to the payment of a normal fee, if any, payable by all patients admitted to a public hospital.

The fee would be determined according to the applicable means test and would be paid by her brother.

The settlement also recorded that the girl's care and treatment would be at the sole and unfettered discretion of the treating doctors and other medical staff at the Steve Biko Hospital.

Lawyers for Human Rights retained the right to approach the court again for an order declaring unconstitutional the health minister's policy of requiring an undocumented minor child to pay a deposit before receiving emergency medical treatment, should new facts sustain such relief.

The health minister's senior advocate, Soraya Hassim, told Louw the settlement did not mean that the girl would immediately get an operation.

She said the child's health was of such a nature that she could not be operated on immediately, but she would be taken to theatre.

The girl would be operated on when her doctors felt she was ready for it and when it was her turn for the operation.

“She has been placed on the list and will be dealt with like any other person... There are about 47 children that need similar attention already on the list,” Hassim said.

Lawyers for Human Rights said the fact that the girl was undocumented would no longer be a barrier to her treatment and they would assist her to get the necessary asylum seeker documents.

The girl's brother said in court papers he believed his sister's condition was critical and that she was dying.

Family members who were present in court expressed their satisfaction about the settlement, but said they were still worried about her health.