IN an age of violence and bloodshed, it was a spark of light in the darkness.

Innerpeffray Library, near Crieff in Perthshire, boasts an extraordinary history stretching back more than three centuries.

Established in 1680, it is Scotland’s oldest public lending library, and opened its doors at a time when turmoil gripped the nation.

Now £100,000 has been set aside to help ensure its unique place in Scotland’s story can be preserved for generations to come.

Lara Haggerty, library manager and Keeper of Books at Innerpeffray, is in charge of a collection spanning 5,000 titles.

She said: “We are a tiny place and not many people have heard of Innerpeffray. It was the very first public lending library in Scotland, which is something we take for granted today.

“But the idea back in 1680, of lending out your books to local people, was really quite radical. And amazingly, it survived. It was lending books right up to 1968.”

David Drummond, the third Lord Madertie, drew up instructions for the library in his will, along with the building of a schoolhouse. It was an unusual request from a man who played no small part in the fighting and upheaval which characterised his times.

The decade of the library’s birth is often referred to as The Killing Time – when Charles II sought to stamp out the Presbyterian Covenanter movement.

But David, who fought on the Royalist side, also lived through the civil wars which culminated in the execution of Charles I in 1649 and the establishment of a short-lived republic.

Ms Haggerty said: “Our founder was born in 1611, and so he had lived through almost a whole century – and what a century to live in.

“Scotland was full of turmoil, and he’s really in it. He was in all the civil wars, in the fighting, in the politics.

“We sometimes think, did he start the library and school to leave a better world behind? We just don’t know, because he doesn’t tell us about that – he just tells us that he wants it to happen.”

A trust was established to keep the library and school running, and in 1739 Robert Hay Drummond inherited the estate at the age of 27.

He commissioned a specially-built library which stands to this day, while the school was still accepting pupils until 1946.

Ms Haggerty said the 500 books which made up the library’s original collection can still be read.

These include religious tomes and texts about medicine, travel, military history and gardening.

A hand-painted 17th century atlas and a “history of four-footed beasts” are both popular with visitors.

Meanwhile, the first 50 years of The Scots Magazine, which launched in 1739, can also be viewed – including a first-hand account of the Battle of Culloden.

Asked about the library’s place in Scotland’s history, Ms Haggerty said it is “impossible to underestimate the importance of such an idea”.

She added: “Scotland became a real literary nation. This place was a little spark that started the flame burning.”

The new funding, which will be provided by the UK Government, is part of the £700 million Tay Cities Deal, which seeks to unlock wider investment.

The money will be used to upgrade the library’s education facilities and visitor information, as well as adding a nature walk.

Alongside the library, £1 million is going towards establishing the Crieff International Highland Centre, with a further £300,000 pegged for St Andrews University for research into climate change. Elsewhere, £1.6 million will be handed to Aero Space Kinross to develop a year-round visitor attraction.

The combined £3 million was originally allocated to acquire the airfield at RM Condor, the Royal Marines base near Arbroath, before the Ministry of Defence announced it would retain it.

Scotland Office minister Colin Clark said all the projects “will make a real difference”.

He said: “Through the UK city region and growth deal programme we have committed more than £1.4 billion to city and growth deals across Scotland, helping to create tens of thousands of Scottish jobs in the years to come.”