They're two of nature's greatest killers, massacring millions of cherished native birds each year.
But now that scientists know their DNA secrets of the stoat and the ship rat, they've got a powerful new codebook to use against them.
Researchers have just put together the genomes – or complete genetic jigsaw – of the two notorious pests, paving the way for a raft of clever new strategies to stop them.
While the ship rat's genome was first assembled five years ago by Dr Florian Pichlmuller, scientists now have a sharper picture thanks to fresh sequencing work by a joint Kiwi and Australian team.
Dr Rahul Rane, of Australia's national science agency CSIRO, explained that the "long read" sequencing methods used to construct the genome were similar to creating "highly accurate big Lego blocks".
Another technique used in genomic sequencing, called Hi-C, provided bridges between the big and small blocks, which were ultimately used to assemble chromosomes and piece together the position of genes.
And there were many genes – around 25,000 – making the finished product one of the highest quality mammalian genomes produced to date.
"Understanding the genetic makeup of this species enables us to investigate how rats adapt to changing environments and what makes them so successful as invasive predators around the world," said Pichlmuller, now based at Genomics Aotearoa.
This month, scientists marked a second milestone by completing the genome of a stoat.
As with the ship rat's, the stoat genome was created using a trapped animal.
Critically, their source stoat, caught on private land near Thames, was a male. That gave scientists both an X and a Y chromosome, and with it the full complete set of genes for the species.
Its genetic make-up was similarly expansive, stretching more than 2.4 billion DNA bases long, and packing more than 20,000 identified protein-coding genes.
This also made it one of the highest quality vertebrate genomes ever produced, with nearly gapless complete chromosomes assembled and annotated.
"Stoats will be one of the trickiest pests to eradicate across Aotearoa, and this genome provides great opportunities to understand their biology, and to create tools to assist conservation," said Manaaki Whenua-Landcare Research scientist Dr Andrew Veale, who led the work.
Those tools might include species-specific toxins, or "gene drives" with the potential to knock out populations – although scientists were only at the start of exploring this contentious and complex area.
Already, Veale was mapping the "connectivity" of the country's stoat populations using spatial models that relied on novel genetic markers.
"Once we have the precise relatedness of each individual and their location of capture, we can create models showing how the animals disperse across the New Zealand landscape," he said.
"These models can then be used to optimise trapping networks, enabling traps to be placed to prevent reinvasion into areas cleared of stoats."
Veale was also developing forensic genetic markers from the genome sequence to identify individual stoats from trace samples such as scat, saliva and hair.
These markers could then be used in a CSI-type setting – if a conservation programme had a dead kiwi with a bite mark, and a dead stoat in a trap, scientists could find out whether the killer had been caught or was still at large.
Professor Dan Tompkins of Predator Free 2050, which co-funded the stoat work, said having the stoat genome set up scientists to find the breakthroughs needed to realise New Zealand's bold mid-century goal.
"Knowing the genetic code of these devastating predators is an important step towards finding their Achilles heel."
University of Auckland conservation biologist Associate Professor James Russell agreed that having full genomes for both the stoat and ship rat was a significant leap forward.
"It's like getting the architectural blueprint for your house. It's nice to have – but then it's what you do with it that matters."
Along with possums, rats and stoats are estimated to kill some 25 million native birds every year.
Around three-quarters of New Zealand's land birds – among them icons like the kiwi or kakapo – remain threatened or close to extinction, and about a third have already been lost since the arrival of humans and pest predators.