The Department of Conservation (DOC) and the Defence Force have teamed up to build a nest site for New Zealand's critically endangered fairy tern ahead of breeding season.
The entire population of the fairy tern, known as tara-iti, is 40 birds and only a dozen of those are breeding pairs.
This week the Defence Force drove tonnes of oyster shells out to Papakanui Spit, off Kaipara South Head, to build an elevated site for the threatened species.
To the Defence Force, the area is their Kaipara Air Weapons Range, but it's also home to a handful of New Zealand's rarest birds - the fairy tern.
Papakanui Spit is one of four fairy tern nesting sites in New Zealand.
The endangered birds make their nests by scraping a small hollow in the sand, leaving their eggs and chicks vulnerable to predators and the elements.
DOC biodiversity ranger Alex Wilson said introduced predators and a harsh environment brought fairy terns to the brink of extinction.
"They're up against the elements. High tides come in and put the nests at risk and then we've got tonnes and tonnes of sand blowing across the landscape which buries nests as well. What we're trying to do here is basically create a compacted area of shell that's hopefully going to stand up to the sands blowing across it and the tides coming in.
The work to build the shell platform is part of a nest protection programme, which has boosted the number of breeding pairs from three in 1984 to a dozen today.
But Ms Wilson said the situation was still dire.
"New Zealand fairy terns are listed as nationally critical so basically the highest threat classification of any species. The current estimate is about 43 of these guys so really not many at all. Every little bit counts so we're saving pairs and individuals as opposed to wider population scales.
She said she was grateful the Defence Force had lent a helping hand.
"This is a fantastic, collaborative project. The public aren't allowed out here so it protects the birds and then of course we've had these guys out here with the Unimog and a driver which has been awesome because we've been able to carry way more shell than we normally would."
Fairy terns breed on beaches during summer between October and February and while the new Papakanui nest has been build in preparation for breeding season, only time will tell if it produces a boost to their numbers.