Veterinarians at New Zealand’s Massey University successfully completed the very first brain surgery on a critically endangered kakapo parrot chick, adapting techniques used for humans and other mammals.

The chick, known as Espy 1B, only had a thin layer of tissue protecting its brain, “causing part of the brain and the dura (the tough barrier around the brain) to herniate out,” said professor Brett Gartrell, Director of Wildbase Hospital, in a statement.

Kakapo parrots are critically endangered species native to New Zealand – there are only 144 left in the wild due to hunting, habitat loss and predators.

Veterinarians from Auckland Zoo, Wellington Zoo and the Dunedin Wildlife Hospital (where the chick was first diagnosed) collaborated on potential options for treatment and decided to attempt the surgery.

Air New Zealand flew the chick for free to the Wildbase Hospital for the procedure, where vets based their surgical plan on the adaptation of techniques from other species to avian medical care.

“This is a risky surgery,” said Gartrell, listing the common side effects for this procedure in humans: brain damage, leaking spinal fluid and meningitis.

The surgery was carried out last week and was a success, and Wildbase says the chick has “made a remarkable recovery.”

The chick will be returned to the Dunedin Wildlife Hospital to allow it to mingle with another kakapo chick to prevent it from imprinting on people.

Kakapo parrots are ground-dwelling, flightless and nocturnal birds that bear the title of “world’s fattest parrot.”