Question: What was the last country invaded by Scotland?
Answer: Panama, specifically the Darién isthmus.
One of the last acts of Scotland, before the 1707 Act of Union joined it to England and Wales to form Great Britain, was an attempt to colonise Darien, an isthmus in Panama.
The idea was that of William Paterson, the founder of the Bank of England. He saw the opportunity of a trading post in Central America which could act as a precursor to the Panama canal, and the idea of annexing the isthmus soon caught the Scottish imagination.
In 1698 the first fleet set sail for Panama, arriving at what they named New Caledonia, and setting up their colony, however before long it turned out that they were woefully under prepared. What they had hoped to be a perfect area to settle was actually a mosquito-infested scrap of land, and by spring 1699 more than 200 of the 1200 settlers had died. Power-fuelled arguments ensued, and if that, the loss of life, and the swampy conditions were not bad enough, worse news was on its way. The English colonies in the region were forbidden from trading with the new settlement, and the Spanish were about to attack.
It wasn’t long until the settlers gave up the venture, less than 20% of the original party setting sail back to Scotland. A second ship-full fared just as badly, and by the early 1700s the country was financially reeling from the debacle.
A few years later in 1707, the impoverished country was forced to sign the act of Union, foregoing its independence and becoming part of the United Kingdom. If the Darien debacle was not the only reason behind the unity, it was certainly a major issue - the Scottish decision was almost entirely financial. The English agreed to pay off £400,000 worth of debt incurred by the Scottish in Panama as well as distibuting a favourable percentage of the new country's tax. English trade embargoes in 1705 showed the fragility of the Scottish economy, and how much it relied on trade with their sassenach cousins; the union would give the Scots a piece of what was to become one of the largest trade areas the world had ever seen.
That said, the Scottish people were not happy with the union and riots occurred. The Scottish nobles however were more easily swayed. Many Scots nobles who took part in the negotiations were bribed, (a practise not unusal for the time) one according to some accounts for the shockingly small sum of £11. Later that century, Robbie Burns summed up the feeling of the Scottish People.
Over a hundred years later, a man claiming to be a descendant of one of the Darién survivors, Gregor MacGregor, copied the scheme but with not quite the same good intentions as Paterson. He set up offices in Glasgow and Edinburgh, and attempted to find investors for a fictional country in the Panama area called Poyais, presenting himself as the self-styled Cazique.
Of course this was nothing more than a Deception, and the people who invested in this scheme lost their money; that though was nothing compared to the 180 would-be settlers, many from Scotland, who lost their lives in the inhospitable climate of the mosquito coast.
The area of Darien has always been a pretty inhospitable place covered as it is with dense jungle, after the Scottish scheme it became a haven for pirates and buccaneers, and even today, the inter-american road which will eventually connect Alaska in the north to Argentina in the south is interrupted here.