OUR national bard Robert Burns visited quite a number of the ancient towns in this series, and enjoyed their hospitality with some such as Dumbarton and Dumfries making him a freeman or honorary burgess of the town, the installation ceremony always a good excuse for a dinner at the town’s expense.

Burns wrote about some of his various visits which is why we know his thoughts about the subject of today’s column, Linlithgow.

He visited the town in August 1787, and wrote: “Linlithgow, the appearance of rude, decayed idle grandeur – charmingly rural, retired situation — the old rough royal palace a tolerably fine, but melancholy ruin – sweetly situated on a small elevation on the brink of a Loch – shown the room where the beautiful injured Mary Queen of Scots was born – a pretty good old Gothic Church – the infamous stool of repentance standing, in the old Romish way, in a lofty situation.”

READ MORE: John Purser on working with Maori musicians and their unique instruments

By the time Burns visited, Linlithgow was indeed past its greatest days, and the ruined palace was the most visible connection to its time as a royal centre. A recurring theme in this series on the ancient towns of Scotland is how often those towns owed their development to the monarchs of Scotland.

This is particularly true of Linlithgow, which was made a royal burgh by one king and became a royal residence under the kings of the Stewart dynasty.

On learning its history, I am wondering why I ever missed it on the original list to which I am still adding.

I also always acknowledge my sources and so today I have to thank none other than Linlithgow’s most famous contemporary son, Alex Salmond.

Not a lot of people know that Alex is an expert on Scottish history generally and he certainly knows his stuff about his native town. I also consulted mylinlithgow.com which I found very useful as was the work of local historian Bruce Jamieson.

That Linlithgow is very ancient is shown by the age of its name which means “the loch in the moist hollow” in the Brythonic-Celtic language spoken by the local native tribes from early in the first millennium.

There is evidence of Bronze and Iron Age settlement in the area as crannogs were found in Linlithgow Loch, and evidence of Roman occupation exists – an aerial survey found the outline of a Roman marching camp as recently as 1989. Like the rest of our very ancient towns, the history of Linlithgow disappears in the Dark Ages, but we can surmise that it slowly but surely developed as a centre of Christianity and trade.

READ MORE: The history of carpetbaggers and their Scottish opponents

The town’s strategic importance as an approximate halfway point between Edinburgh and Stirling dictated its position as a stopping place for those travelling between the two. A royal hunting lodge was in place early in the reign of King David I (r.1124-53) as a long-lost royal charter effectively confirmed Linlithgow’s status as a burgh.

In keeping with his actions in other burghs, King David also commissioned a church in the town in 1140 which he gifted to the Augustinian monks of St Andrews Priory. The church was dedicated to St Michael who became the town’s patron saint – he features on one of Linlithgow’s coats of arms, and a statue of Michael slaying a dragon stands in the town. St Michael’s parish has been one of the most important in the Kirk for centuries.

The other coat of arms features a black dog tied to an oak tree, commemorating the mediaeval story of a faithful hound who brought food to its master when he was chained up for a crime of which he was innocent – it’s why the nickname of the townspeople is black bitches, and Alex Salmond is proud to be one.

King David’s successor Malcolm IV, the Maiden, and his successor William I (below), the Lion, both stayed in Linlithgow, and the town continued to grow in the 13th century with a Carmelite friary and a school both sited in the town.

King of Edward I of England was another royal visitor, though not a welcome one, especially when he stayed in a field to the east of the town the night before the English rout of Sir William Wallace and his Scottish army at the Battle of Falkirk in 1298.

Longshanks obviously remembered the town as during Edward’s occupation of Scotland he fortified the royal lodge which became a castle (or Peel) with a garrison of English soldiers.

The Peel was recaptured by the Scots in 1313 when a farmer called William Bynnie or Bunnock delivered his usual cart of hay to the garrison, using it to block the Peel gate. William and his seven sons then emerged from the hay to kill the occupants and capture the Peel. King Robert the Bruce rewarded Bynnie and had the Peel torn down.

READ MORE: The small Scottish town with a mighty history now overshadowed by its neighbour

Linlithgow suffered more English destruction when Edward III’s invading English army set fire to the town in 1337. Bruce Jamieson records that as Linlithgow was largely built of wood “this had catastrophic results”. Afterwards the town was described as “uninhabited and totally waste”.

Jamieson also gives an example of Linlithgow’s growing importance: “During the parliament of David II (son of Robert the Bruce), held at Perth in 1348, it was statute and ordained, “that so long as the Burgh of Berwick, and Roxburgh are detained and holden by English men, the Burghs of Lanark, and Lithgow, shall be received and admitted in their place, as constituent members of the Court of the Four Burghs”.

The other two members were Edinburgh and Stirling. Linlithgow was also given custody of the standard grain measures – the boll, firlot and peck.

The Black Death arrived in Scotland shortly afterwards and for safety the royal court moved from Edinburgh to Linlithgow, making the town, albeit briefly, the capital of Scotland. It would have a better claim to be the capital after it became a royal residence.

In 1389, the first king of the House of Stewart, Robert II, made Linlithgow a royal burgh, with a plethora of trade advantages including the administration of the port of Blackness on the Forth.

The town would go on to have a long association with the Stewart monarchs.

Much of Linlithgow was destroyed by fire in 1424, and on his return from imprisonment in London, King James I saw the opportunity to build a new residence for the royal family.

Deliberately planning a palace rather than a mere castle, James also sanctioned the rebuilding of the Church of St Michael adjacent to the new Palace. The money for both came from the taxes raised for James’s ransom which he stopped paying. His successors continued to improve the Palace, especially James IV, and as happens when a town becomes a royal residence, Linlithgow grew in stature and importance with trade through Blackness a vital resource.

In 1503, the now substantial Palace was given to Margaret Tudor upon her marriage to James IV. Their son, the future James V, was born at Linlithgow Palace in April 1512, and James was only a year old when his father was killed on Flodden Field.

There then followed one of those regular occurrences in the House of Stewart, a period of regency in which the Scottish aristocracy squabbled over who was in charge.

THE Battle of Linlithgow Bridge in 1526 was the direct result of the power struggle between two of the people trying to control the young king, his stepfather Archibald Douglas the 6th Earl of Angus and his estranged wife the King’s mother Margaret Tudor, sister of Henry VIII of England.

Margaret had been the first regent for her son and wanted power back. Her ally the Earl of Lennox mustered an army of thousands and marched from Stirling. James Hamilton, the Earl of Arran, was sent to delay Lennox while Douglas gathered his forces, and picking his ground well, Arran was able to smash the larger Lennox army with the Douglas troops arriving to complete the rout. Earl Lennox surrendered his sword but was instantly murdered by James Hamilton of Finnart.

Douglas kept control of the young king until 1528 when James escaped to join his mother at Stirling. He made Linlithgow Palace his regular haunt not least because his wife Mary of Guise developed it as a royal home, the king paying for the ornate fountain which still stands in the courtyard.

He also ensured that Linlithgow had proper governance with a Provost and council from 1540 when no fewer than eight guilds or trades were recorded in the town. According to Bruce Jamieson they were “the baxters (bakers), coopers (barrel makers), cordiners (shoemakers), fleshers (butchers), smiths, tailors, weavers and wrights (joiners).”

James V’s daughter Mary, Queen of Scots, was born at the Palace on December 8, 1542, and just a few days later at Falkland Palace the King was given news of the birth as well as a report of his army’s defeat by an English army at the Battle of Solway Moss – he is said to have muttered “it (the Stewart Dynasty) cam wi’ a lass and it will gang wi’ a lass” before he died just a few hours later.

READ MORE: Scotland's oldest Royal Burgh begins plans to celebrate 900th anniversary

Queen Mary loved Linlithgow Palace and visited it often during her life before her abdication and exile. It was while she was imprisoned in England that Linlithgow saw one of the most shocking events in Scottish history, the assassination of James Stewart, the Earl of Moray, who was regent for Mary’s son James VI.

Moray was the illegitimate son of James V and had once been close to his half-sister Mary, but his support for the Protestant Reformation and Mary’s marriage to Henry, Lord Darnley, caused their relationship to crumble and when the Queen was forced to abdicate, he became regent for James VI.

Moray’s army had defeated the forces of Mary at the Battle of Langside in 1568, but the tragic queen still had her supporters and it was one of them, James Hamilton of Bothwellhaugh, who shot and fatally wounded Regent Moray as he rode through Linlithgow on January 23, 1570. Moray was thus the first head of government anywhere to be assassinated by a firearm. There is a memorial plaque commemorating the event at the Sheriff Court.

James VI also used the Palace as a home and gave it to his Queen Anne of Denmark before he went south to take the throne of England in 1603, coming back to Scotland only once afterwards.

Unused, Linlithgow Palace decayed quickly with one of its walls collapsing in 1607. James VI and I paid for refurbishment, but with only one royal visitor – King Charles I in 1633 – the palace continued to deteriorate.

Oliver Cromwell’s troops were billeted there in 1650 and they damaged the building, but it was still standing in 1746 when troops from the Duke of Cumberland’s army set fire to it on their way north to Culloden. Roofless, the Palace remains in Crown hands and is in the care of Historic Environment Scotland.

Stripped of its royal connections, Linlithgow found other ways to thrive and it became an important administrative centre as county town of Linlithgowshire. I’ll return to Linlithgow in a future column giving updates on our ancient towns in the 20th century.

To be included in this series on ancient towns, towns need to have been established as a town, usually a burgh, before the Reformation in 1560. At one or more points in their existence, they need to have played a part in the history of Scotland. Anyone who wants to promote their ancient town for a column should email me at nationalhamish@gmail.com