The golden summer of 2018 saw two of the UK’s rarest butterflies, the large blue and the black hairstreak, enjoy their best years since scientific monitoring began.

More than two-thirds of British butterfly species were seen in higher numbers last year than in 2017, but despite the ideal butterfly weather, it was still only an average season – the 18th best in 43 years of recording.

Species whose caterpillars feed on grasses struggled as grass withered in hot weather, while there were mysterious ongoing declines for the small tortoiseshell and the peacock, both garden favourites. Despite the warmth, both butterflies had their third-worst year since the UK Butterfly Monitoring Scheme – the longest-running scientific insect monitoring project in the world – began in 1976.

Prof Tom Brereton of Butterfly Conservation said: “There were not as many butterflies around as we might have expected given the fabulous weather over much of the butterfly season, and overall, 2018 ranked as barely better than average.

“This, and the fact that two-thirds of butterflies show negative trends over the long-term, highlights the scale of the challenge we face in restoring their fortunes and creating a healthier environment.”

The endangered black hairstreak saw its numbers soar by 926% on the previous summer, with the best weather coinciding with its June flight season. Other wood-edge butterflies – including the purple emperor, the purple hairstreak and the wood white – also did well, benefiting from the warmth while not becoming drought-stressed.

The “beast from the east” and chilly February and March may also have helped the survival of eggs, caterpillars and chrysalises, which rot or are parasitised in mild winters.

The large blue, which was hastened to extinction by the dry summer of 1976, enjoyed its best year since being reintroduced in 1983 via caterpillars from Sweden, increasing by 58% on 2017. There are more large blues now flying in Britain than any other country.

It was a vintage year for the “cabbage whites”, with large whites up by 118%, small whites increasing by 155% and green-veined whites rising by 63%.

Other species thriving in 2018 include the brown argus and the speckled wood, with their third-best years on record, according to the data gathered by volunteers on 2,873 sites across Britain and compiled by Butterfly Conservation, the Centre for Ecology & Hydrology, the British Trust for Ornithology and the Joint Nature Conservation Committee.

But the dry weather affected caterpillars that feed on grasses that withered and died prematurely in the hot, dry conditions. The gatekeeper, small skipper and Essex skipper all fell by more than 20% on the previous year.

Lepidopterists fear that this year, more species will exprience knock-on effects, with drought killing the food plants that the next generation of caterpillars need to survive. The 1976 drought was the worst “natural disaster” for British butterflies, with the populations of one in four species crashing the following year, and many rare species never fully recovering.

Brereton said: “It remains to be seen what the knock-on effects of the 2018 heatwave will be. We know that extreme events such as this, which are set to increase under climate change, are generally damaging to butterflies.”