WHAT is wilderness for?

The short and obvious answer is that it isn't for anything. It simply is. And yet, as soon as we step into "the wild", in reality or in our imaginations, another question looms: what does "wild" actually mean? With every part of the planet mapped from space, and with the impact of our activities evident from pole to pole, has the boundary between tame and wild, familiar and unknown, human and non-human, become so frayed as scarcely to exist?

I open the back door one evening and there is a toad. It is as if it has been waiting for me to open the door. I contemplate the toad. What is the toad contemplating?

The toad, the squirrel, the heron in flight, do not - as far as we know - imagine the world they inhabit. They do not measure it in time, but their world is eternal compared with ours. When I meet a deer in the woods, I am meeting all its ancestors and descendants at once. The deer meets only me, and flees. Yet the deer will be there long after I am gone.

*

In 1867, at the age of 29, John Muir set off on his first great American ramble, walking a thousand miles from Indiana to the Florida Keys. For reading company on the two-month trip the visionary Scots-born environmentalist carried his New Testament, Milton's Paradise Lost and Robert Burns's Poems. Already he had moved away both from the harsh religion of his upbringing, which set mankind above the natural world, and from the idea that the role of humans was to exploit and conquer it. As he walked and observed, he found that in the "book of Nature" concepts such as sin and redemption were meaningless.

He would continue to revere Christ's life and teachings, and to admire Milton's poetic genius, but something fundamental had shifted in his philosophical outlook: in "God's wilderness", far from it needing to be mastered and tamed, lay "the hope of the world - the great fresh unblighted, unredeemed wilderness. The galling harness of civilisation drops off, and the wounds heal ere we are aware".

Muir's beloved Burns, however, survived unscathed, and indeed was enhanced, in his new thinking. People and animals alike seemed to like Burns's verses, Muir later wrote. "In the Sierra I sang and whistled them to the squirrels and birds, and they were charmed out of fear and gathered close about me. So real was his companionship, he oftentimes seemed to be with me in the flesh, however wild and strange the places where I wandered."

The secret of Burns's success, Muir decided, lay in his "all-embracing sympathy" for every living thing, from the sleekit, cowrin tim'rous moose to the mountain daisy, the wounded hare, the poverty-stricken widow, the transported slave - even the Deil.

Muir found ways into nature through other literature - the Romantic poets, for example, and Thoreau - and he corresponded with and met Ralph Waldo Emerson. Books opened doors to an understanding of the world just as passes and canyons opened doors to "alpine mansions". The truer experience, though, would always be the physical one. The opening sentences of his own book, Our National Parks (1901), confirm Muir's belief that wild places could liberate people and restore them to sanity: "The tendency nowadays to wander in wilderness is delightful to see. Thousands of tired, nerve-shaken, over-civilised people are beginning to find out that going to the mountains is going home; that wildness is a necessity; and that mountain parks and reservations are useful not only as fountains of timber and irrigating rivers, but as fountains of life."

More than a century on, as true wilderness shrinks and vanishes under ever greater human pressure, those words should haunt us. The more threatened something is, the more precious it becomes. This is not just about Amazonian rainforest or Arctic ice: you may instinctively want to reduce carbon emissions and shift the economy away from growth towards sustainability, but can you square those aims with, say, the industrialisation of the Scottish landscape through hydro-electric schemes, wind farms and ranks of pylons? How far are we willing to limit or reduce our lifestyles, or what will we sacrifice in order to maintain them? And how can more and more of us go to wild places without simultaneously destroying the very benefits we seek from them? If John Muir was right and wildness is a necessity, for what and for whom is it necessary?

Muir made a conscious decision to live out his philosophy, spending months and years alone in the mountains. Few of us have that kind of time available or that level of commitment, and we enjoy our comforts too much: our relationship with the wild is more likely to be occasional, temporary, a trade-off with the other parts of our lives. Burns made his living as a farmer, not as an environmentalist: it was while ploughing that he destroyed the mouse's nest. Arguably, humankind's relationship with wild creatures and their habitats has been irrevocably compromised since most of us ceased to be hunter-gatherers.

*

That tenuous relationship with wild places has been explored by many Scottish writers besides Burns, and it is also a significant part of Scotland's historical mythology.

Long before Burns or Muir or disenchantment with urban life, Scotland's wilder bounds were refuges from law and oppression, retreats in both the spiritual and military senses. Robert the Bruce's route to the throne and to victory at Bannockburn passed first through country where his enemies could not track him, where he could rest and renew himself: the inspiring spider, if legend is to be believed, taught the king its lessons while he hid in an island cave.

In the 17th century, the Covenanters took to the moors to escape the attentions of government troops, and to worship God in open-air conventicles. Psalm 121 - "I to the hills will lift mine eyes, from whence doth come mine aid" - resonates even now in Presbyterian congregations, as it seems to connect back to the days of persecution. And those political antagonists of the Covenanters, the Jacobites, are also popularly associated with living off the land, with flights through and sanctuaries in wild, beautiful landscapes. To be "out" in the 1715 or 1745 Risings was not just to be out against the government, but to be "out amang the heather".

The sometimes ambivalent Scottish attitude to wilderness has been shaped by other influences. For centuries, from a prejudiced Lowland perspective, to cross the Highland line was to go from civilisation to barbarism as well as from settled, managed land to uncultivated forest and glen. This distinction was perpetuated in more sympathetic, literary form, first through the Ossian cult and then through the poems and novels of Sir Walter Scott. Scott's The Lady Of The Lake and Rob Roy, in particular, managed both to popularise the Southern Highlands as a tourist destination and to emphasise the exoticism of their landscapes and inhabitants.

Writing in 1829, 11 years after his novel's first publication, Scott ascribed the public's interest in Rob Roy to the fact that "a character like his, blending the wild virtues, the subtle policy, and unrestrained license of an American Indian, was flourishing in Scotland during the Augustan age of Queen Anne and George I". What Scott did through his fiction was to transport readers across a line that was both imaginary and geographical. When Edward Waverley in Waverley, or Frank Osbaldistone in Rob Roy, enter the Highlands, they go as civilised innocents and romantic dreamers, and they come back wiser, chastened by the experience.

In Scott's lifetime and for several decades after, however, those Highland glens and straths were being dehumanised, emptied of their substantial populations through the Clearances. In the same period the Industrial Revolution hit central Scotland with a speed and brutality unmatched, according to some historians, anywhere else in Europe. Not surprisingly, a sentimental folk memory of rural Scotland was established through popular song and poetry: sentimental, nostalgic, yet not altogether unrealistic, for even from the most urbanised and overcrowded areas it was often possible to see hills covered in fresh, white snow or bathed in summer evening light - enticements to escape from cramped, dirty and unhealthy conditions. In the 1920s and 1930s, working-class climbing and walking clubs burgeoned, enabling people from humble backgrounds to reach places of unimagined beauty and grandeur, some of which lay no more than 20 or 30 miles from Glasgow.

*

Writers after Scott continued to "visit" wild Scotland both in fiction and poetry. The centrepiece of Robert Louis Stevenson's Kidnapped is Davie Balfour's 230-mile hike from the isle of Erraid off Mull, through some of the roughest, most spectacular Highland scenery, to gain his rightful position in Edinburgh society. Its closing sentence - "The hand of Providence brought me in my drifting to the very doors of the British Linen Company's Bank" - is a dry, accountant's conclusion to the colourful adventures that precede it.

John Buchan, following Stevenson's lead, constantly flips a coin which has civilisation on one side and barbarism on the other. He also repeatedly pitches his characters into or against wilderness. Whether it is Richard Hannay in The Thirty-Nine Steps or less well-known characters in his historical fiction, Buchan's heroes seldom escape being tested by storm, flood and trackless country. Few writers are as good as he at describing weather and landscape.

In Buchan's last, posthumously published novel, Sick Heart River, the terminally ill Sir Edward Leithen goes on a search for a missing man in Canada's northern territories. Buchan himself had been on a similar trip as Governor-General in 1937: "It is impossible to describe the country," he wrote, "for it is built on a scale outside humanity ... In spite of the heat there is an exhilarating freedom and purity in the air. It is the essential romance of Nature with man left out." He translated these impressions into fiction in Sick Heart River. The deeper the sick Leithen goes into the wilderness, the nearer he comes to an understanding of what it is to be alive:

"The cold, infernal North magnified instead of dwarfing humanity. What a marvel was this clot of vivified dust! The universe seemed to spread itself before him in immense distances lit and dominated by a divine spark which was man. An inconsiderable planet ... the vegetable world on which every living thing was in the last resort a parasite! Man, precariously perched on this rotating scrapheap, yet so much master of it that he could mould it to his transient uses and, while struggling to live, could entertain thoughts and dreams beyond the bounds of time and space!"

If all this seems unremittingly masculine in the way wilderness is contested and seen as a challenge, even a battlefield, one Scottish text rises above all others as an exploration of why we need wild places, and what we take to and bring from them - and it is the work of a woman. Written during the Second World War, The Living Mountain is Nan Shepherd's hymn to the Cairngorms, the mountains she knew and loved for decades. She sent it in manuscript to her friend Neil Gunn. Gunn - who also wrote with a profound understanding of people's relationship with the land and sea about them - recognised immediately the quality of what she had produced, yet The Living Mountain languished unpublished until 1977. Since then it has, rightly, gained an immense reputation. Gunn told her it was "beautifully done", with restraint and "an exactitude that is never pedantic but always tribute. So love comes through, & wisdom ... you deal with facts".

Far from being crushed by the immensity and resilience of the Cairngorms, Shepherd was uplifted and released by her relationship with them. Behind everything that humans did to or on the mountain, was "the mountain itself, its substance, its strength, its structure, its weathers". In growing her knowledge of the mountain, she found that the mountain and its attributes grew too: "Man's experience of them enlarges rock, flower and bird ...

"It is a journey into Being; for as I penetrate more deeply into the mountain's life, I penetrate also into my own. For an hour I am beyond desire ... I am not out of myself, but in myself.'

This could be the worst kind of mystical nonsense, but Shepherd explicitly rejects what she calls "glamourie", which, she says, "interposes something artificial between the world, which is one reality, and the self, which is another reality, though overlaid with a good many crusts of falsehood and convention". Instead, she builds a direct relationship between herself and the Cairngorms. Each word in The Living Mountain is careful, observed and accurate.

If you have spent time, especially time alone, in the hills, almost everything she writes is recognisably true. And in Shepherd's wake have come other considerate, keen witnesses to the continuing importance of wild places, such as Linda Cracknell and Kathleen Jamie. Jamie questions the very idea that "wild" - that is to say, something untouched by humanity's hand - even exists any more, but that doesn't stop her wanting to watch and listen to what is out there, and to intrude as little as possible on what she finds.

That takes us back to Burns, apologising to the mouse he has just made homeless. Time, Burns realised, levels all living things, but the mouse is spared this truth. Deep down we understand that stones and water, wood and sand, ice and fire, and creatures that know nothing compared with what we think we know, will all, probably, survive us. If this is not what wilderness is for, it is certainly what it does: it puts us in our place.

James Robertson's most recent novel, The Professor of Truth, is published by Hamish Hamilton. On June 27, he gives a keynote talk at this year's Littoral festival, the programme of writing and ideas inspired by nature and the environment that is part of the award-winning East Neuk Festival (June 27-July 5). This year's theme is Wild And Tame and looks at literature's reflection on issues of re-wilding and living with nature in a series of talks and events - including walks, photography workshops and falconry display - with some of the UK's finest writers including Helen Macdonald, Mark Cocker and Jim Crumley. www.eastneukfestival.com