An 8-year-old kiwi in danger of being destroyed has instead been given a new lease on life by six hours of ground-breaking surgery.
The crippled kiwi, known as K2, was raised in the captive breeding programme Operation Nestegg.
But he was born deformed, and could not bereleased into the wild.
Despite efforts to mend it, the bird's right foot remained facing backwards, forcing him to walk with an awkward shuffle, using his beak as a walking stick.
Worse, the otherwise-healthy North Island brown, a member of a species which is dwindling in numbers on the mainland, was unable to breed.
Kiwi mate with the male holding on to the female with both legs.
"Basically, he couldn't get a grip," said Whangarei Department of Conservation spokesman Gerry Brackenbury.
The North Island brown kiwi is among 50 native species listed as being "in serious decline" in a revamped Department of Conservation endangered species list issued late last year.
The decision to try surgery on K2's leg was made when Whangarei Museum, renamed Whangarei Heritage Park, started a major upgrade of its kiwi house.
K2 was not thought fit enough to accompany the other birds from the kiwi house to a temporary home on Limestone Island in Whangarei Harbour.
Auckland Unitec veterinary surgeons Dr Alex Walker and Dr Richard Jerram assessed the deformed bird and decided to try re-aligning the leg with a metal plate screwed into place.
The head of Auckland Zoo's wildlife health research centre, Dr Jakob-Hoff, said it was the first time vets had used the technique to correct a deformity.
It took two three-hour sessions of surgery to complete the operation, and 14 screws hold the plate in place.
K2 is back on his feet, this time with both facing in the same direction.
Twice-daily physio sessions did not seem to bother him, Dr Jakob-Hoff said.
"He is so used to being handled he just sits there.
"He now has to rewire his brain so he can walk properly, and that will probably take a few more weeks."
The effort invested in the bird was worth it, he said.
"Kiwi are still on the decline in a major way and we had to take the opportunity for this one to become a breeding bird," he said.
Mr Brackenbury was upbeat about the K2's improved chances of finding a mate.