Scotland has a new species of butterfly: the elusive and endangered white-letter hairstreak has been discovered in a field in Berwickshire, 100 metres from the English border.

It is the first time since 1884 that the butterfly has been sighted in Scotland, raising hopes that climate change has helped it become the 34th butterfly species to live and breed in the country.

“Climate change is a double-edged sword but it’s an exciting time to be in the Scottish borders,” said Paul Kirkland of Butterfly Conservation Scotland. “It’s not just butterflies but moths and dragonflies are moving north quite quickly.”

More than a quarter of Britain’s 59 butterfly species are spreading north, with insects such as the comma moving about six miles each year. In recent years, butterflies that were once only found in southern Britain have crossed the border in Scotland, including the comma and the small and Essex skippers. Within Scotland, species such as the ringlet, orange tip and peacock have moved rapidly north and into the Highlands.

The white-letter hairstreak normally lives out of sight at the tops of elm trees but was earlier this month spotted in field near Paxton, Berwickshire, by butterfly recorder Iain Cowe. While it was seen only just across the border, the nearest known colony of this small butterfly is 25 miles south in Northumberland.

“It is not every day that something as special as this is found when out and about on a regular butterfly foray,” said Cowe. “It was a very ragged and worn individual found feeding on ragwort in the grassy edge of an arable field.”

The white-letter hairstreak suffered its worst year on record in 2016, according to the UK butterfly monitoring survey, and although widespread across England and Wales, has suffered a 72% decline over the last decade. Its numbers are down by 96% over the last 40 years.

A poster on the trunk of a mature elm tree, featuring a white-letter hairstreak butterfly, in Nether Edge, Sheffield, UK, alerts passers-by that the tree hosts rare butterflies. Photograph: Deborah Vernon/Alamy

The butterfly’s caterpillars feed on elm and the white-letter hairstreak declined dramatically in the 1970s as a result of Dutch Elm disease. But it has been slowly spreading north and experts believe Scotland could support a good population.

Kirkland added: “The white-letter hairstreak has been moving northwards on the east and west coasts through Northumberland and Cumbria. People have been monitoring its spread but it’s not moving as quickly as the comma. That’s due to the lack of elms but there’s a fair amount of wych elm in Scotland so it could do reasonably well once it’s up here.”

It’s the second new species for Scotland to be announced this week after researchers identified a new species of flower on Shetland. The Shetland monkeyflower was discovered by chance during fieldwork south of Lerwick.