Under cover of darkness, deep in a Cairngorm wood and with eyes peering through a tiny mesh panel, Patrick Galbraith saw what only a handful of people in recent years have witnessed.

It was a chilly April night, and hours had passed since, as quietly as he could, he had zipped himself into his sleeping bag.

Earlier from his tent he’d watched six of Scotland’s most elusive creatures gather, black as the night and with a flash of red smeared across their eyes.

One by one, wings wildly flapping, the half dozen capercaillie rose to roost high in the pine trees, calling as they settled while just a short distance away lorries and cars roared by on the A9.

Now, before the break of dawn, shivering from the cold and trying not to make a sound, Patrick’s patience was rewarded as he watched the birds’ remarkable mating dance.

He had been guided to the hide by an Aviemore gamekeeper who told him how, as a boy, he had seen capercaillie so frequently that it was barely worth mentioning.

Since then, loss of habitat, predators, climate change and fragmentation has left their numbers hanging by a thread.

The night-time episode watching the male capercaillies ‘lek’ to attract a mate is recalled by Patrick in a thought-provoking new book which documents his travels around the UK in search of ten of our most endangered birds.

The encounters he has - holding a delicate nightingale in the palm of his hand, sleeping out on one of the country’s biggest capercaillie leks, and tagging a hen harrier - are extraordinary moments with nature that few experience.

Travelling from Orkney, where he finds kittiwake numbers have declined by 87% since 2000, to the Western Isles where some of the country’s few remaining corncrakes can be found and to the Norfolk Broads in search of the bittern’s distinctive booming call, he criss-crosses the UK to find disturbingly similar stories of loss.

While the birds’ numbers suffer, there are further victims: in the rural crafts which once helped to sustain birds’ habitats such as hedge layers and reed cutters, among poets, writers, musicians and artists whose creative juices are fuelled by the sights and sounds of Mother Nature, and people who for generations have felt a connection with the birds that roost around their homes.

In the middle is a grim battle between gamekeepers, animal rights activists and conservation bodies, each putting forward their case and sometimes with conflicting ideas that may benefit one species at the expense of another.

Patrick’s book, In Search of One Last Song, has his search of threatened birds at its heart but, he points out, it is as much a sociological exploration of how bare our lives would be without them.

“When you talk to the people who live alongside these birds you understand how their sense of identity and the way they understand a place is influenced by the presence of these birds,” he says.

“If you like a particular bird or it means something to you, that bird probably also meant something to people 150 years ago in the same place.

“It echoes down the generations.”

The journey across the UK was sparked after Patrick, raised in Dumfries and Galloway and the editor of a prominent field sports magazine, met naturalist and animal campaigner Chris Packham. The conversation turned to the birds they both adored and the little time some species have left.

Patrick left the meeting acutely aware that if he didn’t hear a nightingale’s song, the gentle purr of a turtle dove or the distinctive popping sound of a male capercaillie soon, he might never have the chance.

Which is why one April night in a Cairngorm woodland close to the A9, inside a tent and with nose pressed against a mesh window, he watched the elusive capercaillie perform its elaborate dance.

The world’s largest grouse species, capercaillies were hunted to extinction in the 1700s, before being reintroduced to the Cairngorms in 1837. Numbers soared to a high of 20,000 in the late 1970s, but a combination of lack of habitat, low productivity, predation, collisions with fences, poor genetic mix and climate change are all said to have impacted numbers.

There were an estimated 1,100 birds in 2016, however a new survey due out later this year is expected to show a further downturn in numbers.

The gamekeeper who showed him to the secret lek, believes figures are now “more like low hundreds”.

Patrick tells how he watched the male birds’ extraordinary dance alone from his hide; white-flecked tail feathers fanned out, head high as they raced back and forth, calling, in vain as it turned out on that particular night, for a mate.

“Camping out on this capercaillie lek was an amazing experience and a priviledge,” he says.

“The gamekeeper is doing all he can for the birds, and he does it because he thinks they are important part of his heritage.

“He has lived man and boy through these birds. But while he is trying to control deer numbers, he believes predators are also a big problem. “Foxes are a big problem, badgers are another - but that’s hugely debated,” he adds.

“One difficultly is so there is so much human conflict. Some birds would be in a much better place if different stakeholders were able to work more effectively together.”

On his journey Patrick finds a common theme: the impact of human activity on landscapes affecting bird numbers, and the deep sense of loss as their numbers slump.

“I spoke to a poet from Aberdeenshire who thinks that the soundscape of a place gives you a far richer understanding of it than a photograph can,” he continues.

“If you think of the loss of birds and the way that changes the way places sound… something rich and deep is being lost.”

That is brought into sharp focus as he searches out the corncrake in North Uist. Once common throughout the land, the tiny birds now cling to small areas of the west coast.

“It is incredible to think that in the middle of the 19th century you could hear corncrakes calling on the edge of Charlotte Square in Edinburgh. Now they have been pushed right up to the fringes of the country,” says Patrick.

“My uncle lives on the Ardnamurchan peninsula, he remembers when the corncrakes would keep him awake at night making this extraordinary sound. There was once plenty of corncrakes on Skye but this year they counted just 10.”

As bird numbers slump, the connections between birds and people, customs and culture are fading too, he adds, pointing to Lewis Grassic Gibbons’ Sunset Song and references to peewits “crying across the hills”. The birds are now a ‘red list’ species.

From the arrival of the first swallows heralding spring to lapwings heading to lowland fields for winter, birds’ movements have influenced human behaviour, he adds.

“Fishermen will talk about how they knew it was time to paint their boats when the corncrake come,” he adds.

“Often people’s understanding of time and the rhythm of the seasons was through the birds coming and going.”

In Search of One Last Song, by Patrick Galbraith with illustrations by Robert Vaughan is published by Harper Collins, is released on April 28.

Tie piece Patrick Galbraith went in search of ten birds at risk, however the RSPB’s Red list of birds of greatest conservation concern includes 70 species.

Nightingale – known for their beautiful song, just 6,700 male nightingales are thought to remain, mostly in the southeast of England.

Hen Harrier – intensely persecuted, in 2010 there were just over 600 pairs in the UK.

Black Grouse – changes in land use and farming have affected numbers. There are now thought to be less than 5,100 males.

Capercaillie – Hunted to extinction and then re-introduced, numbers have slumped to just over 1,100.

Kittiwake – Found around the UK and regular visitors to Orkney and Shetland, their numbers are being affected by loss of food caused by climate change and fishing.

Turtle Dove – The UK population fell by 77% between 1970 and 2001, probably due to fewer seeds available on farmland.

Grey Partridge – Numbers fell by 82% between 1970 and 1998 mainly due to loss of food sources on farmland.

Bittern - In 1997 only 11 birds were left, however a conservation programme has seen numbers rise in recent years to around 160.

Corncrake – Once common across the UK, now only found in small pockets in the west Highlands and Hebridean islands.