In the mosquito-riddled Central American summer of 1698, Scots men and women were dying in their hundreds. Some perished of malarial fever. More were killed by the hostile natives of Darien on the Isthmus of Panama.

The Scots had arrived just weeks earlier after sailing 3,000 miles to start a new chapter for their nation – and help forge their unique destiny.

But this adventure was turning out to be an unremitting disaster. They had sailed without medicines or suitable clothing. They were utterly ignorant of the country where they intended to establish a settlement, its inhabitants and their language. They were too few and too ill-equipped to defend themselves.

Scroll down for video

HISTORY LESSON: A Scottish attempt to establish its own empire ended in misery and despair in the fever swamps of Central America

They had ventured forth with high hopes, believing their enterprise would open the way to a glorious future – and they were utterly deceived, victims of one of these waves of irrational optimism, recurrent in Scottish history and, sadly, often ending in bitterness and tears.

The infamous Darien Scheme was the last and most ambitious venture of an independent Scotland. Its failure cast a gloom over the country for years.

The debacle may have relevance today. So, as First Minister Nicola Sturgeon seeks to extract further powers from David Cameron, and Scotland moves towards a state of independence, it is instructive to examine the nation’s history – and what made it sign up to the 1707 Treaty of Union.

Between 1603 and 1707, Scotland and England shared a monarch, but remained nominally independent countries. England, however, was the dominant partner. It was larger and richer – just as it is today.

Moreover, while the English Empire was expanding in the West Indies and America, Scottish merchants, like other foreigners, were denied any share in it under the English Navigation Acts. So it was natural that Scots, conscious of the nation’s poverty and jealous of English successes, should seek to emulate their neighbours and found their own colonies, even their own overseas empire.

as First Minister Nicola Sturgeon seeks to extract further powers from David Cameron, and Scotland moves towards a state of independence, it is instructive to examine the nation’s history – and what made it sign up to the 1707 Treaty of Union

The Scottish parliament passed an Act creating a ‘Company of Scotland’ that was ‘calculated for the general interest of Our Nation’.

William Paterson, a London-based Scot, came forward with an enticing proposal. Trade between Europe and Asia was increasing and he argued enormous profits could be made if the long voyage round Africa could be avoided. He proposed the establishment of a Scottish colony to be called New Caledonia at the narrowest point of the Americas, which would serve as an entrepot, capable of capturing the bulk of East-West trade.

Theoretically, it was a splendid idea and Scotland responded enthusiastically. Up to a third of the nation’s liquid assets – its cash – was put into the enterprise. All over the country, men borrowed what they could to invest.

Attractive though it was, the scheme was also pie in the sky. (Sounds familiar?) For one thing, Darien was part of the Spanish empire. Any colony would have required the support of the (English) Royal Navy – which was not forthcoming. Then the expedition was ludicrously ill-prepared. The goods the colonists took to sell were mostly woollens – for which there was no demand in the tropics.

There was no military support and the Isthmus of Panama was a fever-swamp. Fewer than one in four of the first colonists survived. They died in squalor and misery. A second expedition was refused provisions in the English West Indies and eventually surrendered to the Spanish. The Company of Scotland collapsed: an ignominious failure.

More than a hundred years later, Sir Walter Scott said that if he had been alive at the time he would have been against the Union but now was satisfied it had been for the best

For many the lesson was clear. Scotland was a poor country that couldn’t go it alone successfully. Only a full Union with England and consequent access to the opportunities offered by the English Empire could make Scotland prosper.

In time even many who hated the idea of the Union were persuaded of its necessity. More than a hundred years later, Sir Walter Scott said that if he had been alive at the time he would have been against it, but now was satisfied it had been for the best. A miserably poor Scotland had become rich, one of the chief powerhouses of the Industrial Revolution.

And today? The wheel has turned. Scotland is edging towards the exit. The SNP government is gradually acquiring so many powers that it believes the final step to full independence will be only a small one.

The nation seems to be sleep-walking out of the Union and doing so even though the premise on which the SNP based its assumptions as recently as a year ago is – alas, like the grand Darien Scheme – riddled with holes.

North Sea oil is a diminishing asset. The global price has collapsed and further extraction is more expensive.

The SNP speaks of ‘progressive policies’ – which means Socialist ones. Having won the Labour vote in Glasgow and the west of Scotland, it has no choice if it wants to keep it. So the SNP is committed to higher spending on all public services without the means of promoting the prosperity and increasing the wealth on which that spending depends.

Nationalist Scotland will therefore be a high-tax, low-growth country. Enterprise and profits will be dirty words. The Government will have to finance its structural deficit by borrowing, probably at a high rate of interest. It will be hard to attract inward investment. Gradually, Scotland will sink into socialist squalor.

The country will not be as miserably poor as it was in the 1690s, but it will be much poorer than it need be, and much poorer than England.

The Darien disaster forced Scots to confront reality and recognise the merits of Union. Now, with the SNP’s make-believe economics, we are in grave danger of drifting out of that Union – even though only last September a majority of Scots voted against independence, believing that we are indeed ‘Better Together’.

If Nicola Sturgeon again threatens to lead us into a stagnant swamp, as unhealthy as the fever-land in which the Darien colonists perished, Scotland will be in grave danger of going bust. Shame might prevent any application for a return to the Union. But it will be forced to come back begging.