Jahi McMath
Nailah Winkfield and Martin Winkfield have battled to keep teenage girl Jahi McMath on life support Reuters

A 13-year-old US girl who was declared brain death after complications from a tonsil surgery in December has been released from a California hospital. Her family has battled with authorities to keep her on life support.

The body of Jahi McMath left Oakland's Children's Hospital & Research Center near San Francisco attached to a ventilator and accompanied by a critical care team.

McMath's uncle, Omari Sealey tweeted:

"Thank you to everyone that supported us, prayed for us, and donated to us!!! We are forever grateful," Sealey added.

McMath's family lawyer didn't disclose the location where the girl was taken, citing privacy and security reasons.

"They are going to care for her, respect her and love her. And they're going to call her Jahi, not 'the body.'

"It was a very tense situation," Christopher Dolan said. "It's brought out the best in people and the worst in people.

"We've had people make threats from around the country. It's sad people act that way, so for Jahi's safety and for those around her, we will not be saying where she went or where she is," Dolan said.

Jahi McMath
13-year-old Jahi McMath was pronounced brain dead in December Facebook

McMath was pronounced brain dead in December, after a tonsillectomy to treat a sleep disorder went wrong.

A legal battle erupted between the hospital that wanted to unplug her from life support and her family.

The hospital, also backed by an independent paediatric neurologist from Stanford University, argued that McMath was legally dead and there were no chances of bringing her back to life.

However her mother, Nailah Winkfield, believes her daughter is still alive and can recover.

The case attracted worldwide attention. An online fundraise drive launched by the family to help transfer McMath collected more than $48,000 (£29,000).

Last week Alameda County Superior Court Judge Evelio Grillo ordered the hospital to keep the ventilator on until January 7. Later Judge Grillo ruled McMath could be transferred to a different facility.

A New York extended-care facility has offered to care for McMath but it is not clear if the family will take her there.

"We hope that the family finds peace in this very, very tragic story," said hospital spokesman Sam Singer.