Corncrake numbers have increased dramatically, a RSPB report finds Sergey Yeliseev/Flickr

One of the rarest breeds of bird in Scotland has made a remarkable and surprising comeback, with its most successful season in 45 years.

The RSPB had said the population of corncrakes was expected to fall further this year, after declining 23% last year.

However, its latest report found there were 1,289 calling males recorded between May and July – a 45% increase on numbers seen in 2013.

Corncrake populations fell dramatically throughout the 20th century with intensifying agricultural production – in particular a shift to the mowing of hay meadows and silage fields – as the main cause of the losses.

A conservation effort was launched in the 1990s after populations fell to just 400 adult males, which were concentrated in the inner Hebrides, the Western Isles and Orkney.

Paul Walton, head of habitat and species for RSPB Scotland, said: "This year's figures for Scottish corncrakes are fantastic. They are testament to the dedication of crofters, farmers, the conservationists working alongside them, and to the Scottish Government and SNH officials who have helped target agricultural support to deliver this result for wildlife."

Corncrakes are hard to spot so their numbers are estimated by the call of the male Sergey Yeliseev/Flickr

Corncrakes are pigeon-sized birds that breed in Scotland before migrating to Africa in the winter. They tend to stay hidden in tall vegetation, where they can safely raise their chicks. Normally, they are identified by their distinctive call rather than sightings.

While the RSPB has welcomed the recovery, they said the species is still in danger: "Last year's fall in corncrake numbers was worrying and this bird remains highly vulnerable, so we can't afford to be complacent," Walton said.

"Even though there has been an increase in numbers this year, we have so far failed to expand the corncrake's breeding range. They are still found in only a few isolated areas of Scotland, mainly on the islands, so that's where we need to focus our efforts next. We also need to bring together the methods we've used for corncrakes and apply them to other Scottish birds that are in trouble, like the curlew and the corn bunting, to help secure their future in Scotland."

Jamie Boyle, site manager for RSPB Scotland's Uist reserves, said: "The number of calling males that we've recorded this year has been very encouraging. Corncrake populations really seem to have bounced back after a worrying decline in 2013, and that is a tribute to local crofters whose land management has provided these birds with the habitat they need to breed successfully."