Four years ago, one of Ireland's most ancient cattle breeds, the Bó Riabhach, became functionally extinct.
With little over a dozen animals alive on the island, and a gene pool too small for successful breeding, it looked like this most Irish of cattle breeds was entering its last generation.
But through a combination of determination and scientific innovation, a handful of dedicated breeders have bought the Bó Riabhach back from the brink.
The Bó Riabhach had been a popular breed in Ireland for at least 1,200 years and may even have been introduced here by the Vikings.
The breed remained popular until around 100 years ago, when a mixture of superstition and the introduction of other breeds led to a steep and seemingly irreversible decline.
"Superstition really went against the breed," says Darren McLoughlin, secretary of the Bó Riabhach Society. "Superstition has always been a powerful thing in Ireland - you just have to look at all the ringforts that we have still standing today to see that.
"But when it came to the Bó Riabhach, they became a symbol of bad luck and they started to become less popular.
"In an edition of the Farmers Gazette in 1900 it is mentioned that the Bó Riabhach is starting to decline and to be heavily crossed with other breeds."
Matty English Hayden (pictured), chairperson of the society, says the writing was on the wall for the Bó Riabhach as far back as the coming of the Industrial Revolution, when cattle began to be exported in large numbers from Ireland to Britain.
The Carlow farmer, whose own dairy herd is now made up exclusively of native breeds including Kerry, Droimeann and nine Bó Riabhach, says that the Bó Riabhach has for too long been the "forgotten foundation stone" of the Irish cattle herd.
The Bó Riabhach thrived in Ireland for hundreds and possibly thousands of years until the Industrial Revolution prompted a slow shift to the larger shorthorn breeds, which could be exported to England for slaughter.
"The first big population of cows came into Ireland about 5,000 years ago and over time they acclimatised. Whether they were suitable or not, over time they became suitable," says Matty.
"There was really no major change to the farming system here until the opening up of beef markets in Britain, which led to the introduction of the shorthorn."
The numbers of Bó Riabhach began to decline steeply around 1900, and by 1990 their distinctive brindle or striped patterned hide had almost vanished from the Irish countryside.
"Lots of people remember seeing herds of them when they were children, especially in the west. They seem to have remained popular in Clare and Mayo for a long time, but all of the cows we have today came from Kerry and Cork," says Darren McLoughlin.
"By the time the 1990s came around, the numbers were in sharp decline. Jill Smith (a Cork farmer) was the first to recognise that it was almost gone and she started to gather them up."
In the early '90s, she placed advertisements in newspapers looking for any traces of the Bó Riabhach. With the help of a few dedicated farmers such as Con Cremin, Robert Moore, William McCarthy, Liam Byrne and Noel Kiernan, the breed survived, but by 2016, it was once again on borrowed time.
"There was a handful of breeders who really kept it alive over the last few decades. But back in 2016 we realised that the numbers had slipped as low as 15 - it was really, really on the brink of extinction. Now we have about 40 or 50 cattle and the numbers are increasing all the time," says Darren.
"We have a big enough gene pool for now, but in the future we will have to out-cross. We want to keep the genetics as tight as possible so we might cross in a few Kerry or Droimeann, but there are also Shetland cattle which are supposed to be quite similar.
"There are similar cattle in Normandy and in Iceland, so there is a theory out there that the Vikings had something to do with this (the origin of the breed)."
The Department of Agriculture has recently recognised the work of the Bó Riabhach Society and has committed to funding more genetic tests, including a fresh comparative analysis to confirm unique Bó Riabhach DNA.
"From tests done in 2016, we have a hypothetical breed signature, so now we need to have more tested samples so we can fully identify the DNA signature," says Darren.
"This time around we hope to also compare it to the Normandy and Icelandic cattle and see are they any relations and tease it out more that way.
"It might be 2021 before we get the results of these latest tests, but this process will be continuing on after that. We will be testing DNA every year from now on.
"Right now we have a group of maybe 10 people who have Bó Riabhach and are breeding them. At the moment there are herds in Dingle, Waterford, Donegal, Longford, Carlow, Leitrim and North Tipp.
"It's better than it was but really this is the start of the road. It's going to take a decade or more for us to get 100 pure-breeds. Then we will be in a much better condition."
As a former chairperson of the Droimeann Society, Matty English Hayden helped bring that native breed back from the verge of extinction over the past 20 years.
While the situation with the Bó Riabhach is more precarious than that of the Droimeann, he believes with some careful breeding they too can be saved.
"It is going to take some careful management of the stock we have. My preference would be to use other native Irish breeds. We want to keep the gene pool as narrow as possible but we need to have viable animals," he says.
"The Droimeann was a similar situation, except they were starting from a wider base. It's been a great success, we now have animals who are testing as 100pc Droimeann. The population is rising very fast and we now have a good distribution of genes throughout the herd.
"It took about 20 years to get there with the Droimeann, it was slow going, but we got there. We can get there again."
The Bó Riabhach has a long and proud tradition in Irish culture.Its exact origins are unclear, but the breed and its unique brindle patterned hide has been mentioned in Irish folklore for hundreds of years.
One story goes that an old Bó Riabhach boasted that the wet and cold of the month of March couldn't kill it. Angered by this boast, March borrowed three days from the beginning of April that were so wet that the cow drowned.
This legend helps explain why the beginning of April is referred to as 'Laethanta na Bó Riabhaí' or 'the Borrowed Days' in Irish folklore.
According to Mr English Hayden, the Bó Riabhach holds a central place in old Irish culture.
"There is one interpretation of the story which says that the Brown Bull of Cooley might even have been a Bó Riabhach," he said.
"I'm not an Irish scholar, so I can't say for sure, but that is the theory. It certainly was a important animal for the people of Ireland in the past."