Chinese surgeons have successfully replaced a 3-year-old girl’s skull with a 3D-printed titanium alloy substitute in a 17-hour-long operation. The girl had suffered from hydrocephalus, which had swelled her head up to 4 times the normal size.

The surgery was performed at the Second People’s Hospital in Hunan province. The doctors used 3D data and a computed tomography scanner to print three pieces of titanium mesh to replace the entire top portion of the child’s skull.

The first stage of the surgery was to detach the girl’s scalp from her head. Then the surgeons inserted drainage tubes and pumped out the brain fluid before putting in the transplants.

Girl aged 3 recovering after "brain-shrinking" surgery with 3D-printed skull implanted http://t.co/Rm1s7RRJ09pic.twitter.com/OrhF5V5iU3 — China Xinhua News (@XHNews) July 17, 2015

The girl, named Han Han, suffered from hydrocephalus, also known as “water on the brain.” People with this illness have cerebrospinal fluid accumulating in their brain cavities.

Han Han’s swollen skull was about four times bigger than normal. Her head had become too heavy to be supported by her body, causing her to be bedridden since last September.

The bones of her skull were thin and fragile. The girl also suffers from severe pressure in her head, poor blood supply, blindness, and ulcers on the thinning areas of her cranium.

READ MORE: Surgeons perform 'world’s first' implant of entire 3D-printed plastic skull dome (VIDEO)

“CT results showed that Han Han’s brain was filled 80 percent with water,” said Dr. Bo of the Second People’s Hospital of Hunan Province, as cited by 3d.com.

“If she was not sent to hospital for treatment, Han Han would not have survived the summer. We had to first eliminate the infection in Han Han’s head because the brain wound area was too large, and we needed to do skin graft surgery and insert a shunt to help eliminate the infection, and remove the fluid from her brain.”

Physicians emphasize that despite the surgery’s success, the toddler will need additional operations to make a full recovery.

The surgery cost 400,000 – 500,000 Chinese yuan (approximately $64,000 – $80,000), which was raised through an Internet crowdfunding campaign.

In 2014 a similar operation was carried out in the Netherlands by a team of neurosurgeons at the University Medical Centre Utrecht.