IN this final column of three about the town of St Andrews, I will show how it became the most famous town in Scotland due almost entirely to the game of golf.

My first column dealt with the ancient history of St Andrews and how it became important mainly through the religious institutions in the town, and last week I showed how St Andrews was at the heart of the Scottish Protestant Reformation, arguably the most crucial series of events in Scottish history before the suicidal Act of Union in 1707.

Today’s column relies heavily on numerous books about the history of golf, as well as the dozens of websites about the subject, including that maintained by the Royal Burgh of St Andrews Community Council – I applaud them for keeping the Royal Burgh name alive.

READ MORE: St Andrews: From the centre of Catholicism to heart of the Reformation

I always thoroughly check anything about Scottish history that I find online and perhaps a future column will feature the many bloopers, to use a polite word, that I have found. I discovered none about St Andrews, so thanks to all the creators.

Before turning to golf, let me continue where I left off last week. With St Andrews having been the headquarters of the Catholic Church in Scotland, the Reformation was an overall disaster for the town, though its people seem to have joined in the national mood of alteration to Presbyterianism.

One of those townspeople was the scholar, philosopher and Presbyterian reformer Andrew Melville (1545-1622). He was acclaimed across Europe as one of the leading thinkers of his day and was not only educated at St Andrews University but also later taught there and was its rector.

Famous for his disputations – mostly over bishops – with King James VI & I, Melville once called the King “God’s silly vassal” and lived to tell the tale, though he was imprisoned and exiled for a while.

He was also famed as a poet and was chosen to read his own Latin poem at the coronation of James VI’s queen, Anne of Denmark. Melville’s nephew James was also a leading Presbyterian reformer and taught at the university, which was at the centre of the long disputes within the Church of Scotland over episcopacy.

The Melvilles’ fractious relationship with the king did not damage St Andrews. Indeed, while in England James VI & I made the town a Royal Burgh in 1620.

Also educated at St Andrews was James Graham, later the First Marquess of Montrose. Interestingly, he was recorded as a keen golfer, but his siding with the House of Stuart made him unpopular in the town, which rejoiced when he lost the Battle of Philiphaugh in 1645.

King Charles II acted after the Restoration of the Monarchy in 1660 to bring back archbishops and bishops. One of them was James Sharp, a Kirk minister who was a keen Episcopalian and was made Archbishop of St Andrews in 1661, having been a student and professor at the University.

Joining the Privy Council through which Charles II ruled Scotland, Sharp became notorious for his persecution of the Covenanters who were against bishops and the increasing anglicisation of the Kirk under the king. He was quite brutal in the suppression of the Pentland Rising by Covenanters.

READ MORE: St Andrews: The legends behind the most famous town in Scotland

The third-last Protestant Archbishop of St Andrews was assassinated on the Magus Muir three miles west of St Andrews on May 2, 1679, by nine Covenanters who stopped his coach and killed Sharp in front of his daughter, Isabella.

Six of the assassins were never caught. One of them, James Russell, said he had told Sharp why they were killing him: “I declared before the Lord that it was no particular interest, nor yet for any wrong that he had done to him, but because he had betrayed the church as Judas, and had wrung his hands, these 18 or 19 years in the blood of the saints, but especially at Pentland.”

The assassination and the end of the Archbishopric caused the fortunes of the town to dwindle and by the end of the 17th century there were even suggestions that the university might relocate to Perth.

These came to nothing and despite fluctuations in its fortunes, St Andrews University came to be known as one of the best in the UK, if not the entire world.

St Andrews also became known globally thanks to the spectacular spread of a sport that was undeniably devised in Scotland, even if the Dutch played a version of it many centuries ago – the word “golf’” probably derives from the Dutch word “kolf” meaning a club.

I am not going to get into the still ongoing controversies about who invented golf and where was it first played, but there is absolutely no doubt as to which Scottish town is known as the Home of Golf.

Readers will know that I am a huge admirer of King David I, who I consider to be Scotland’s greatest monarch. But until I started researching this article I was not aware that King David can make a fair claim to be the man who made St Andrews what it is today.

That’s because in 1123 in his capacity as Prince of the Cumbrians and heir to the Scottish throne – he acceded to it the following year when his brother, Alexander I, died – David gave a charter to St Andrews which decreed that the links was common land for all the people of the town. It remains in public ownership to this day.

There is some evidence that a form of golf was being played on the town’s links in the 1400s, and indeed almost all early golf in Scotland was played on links courses such as Bruntsfield and Leith in Edinburgh, Musselburgh in what is now East Lothian and Elie in Fife. The game was so popular that in 1457, King James II got the Scottish Parliament to ban football and golf so men could concentrate on their archery skills at a time when war with England was a constant possibility.

READ MORE: Scottish independence lost in 2014. We must understand why

The ban was renewed by James III, but James IV loved playing golf and records of his purchase of clubs and balls still exist. Perhaps he should have maintained the ban, as the Scottish army was outclassed at the disastrous Battle of Flodden in 1513 during which James IV himself was hacked to death.

By 1552, the playing of golf on St Andrews Links was so popular that Archbishop John Hamilton issued a charter confirming the right of the townspeople to play golf on there – the single most important piece of evidence of its role as the foundation course for the sport.

Two years before he made St Andrews a royal burgh, in 1618 King James VI & I decreed that golf could be played on a Sunday by all layers of society in Scotland, and there’s no doubt that St Andrews began to benefit from visitors keen to play the course on the links.

The university’s students were also able to play there and there is a letter preserved in the National Library of Scotland in which a tutor, James Morice, asks the father of three students how often they should be allowed to play. The father, a lawyer named John Mackenzie, permitted them to play twice a week when the weather was fair.

The fame of the course was spreading as golf began to be played across Scotland and England, but it was the townspeople themselves who ensured that St Andrews would become the Home of Golf.

There are other clubs which have legitimate claims to be older – the Royal Burgess Golfing Society in Edinburgh and the Honourable Company of Edinburgh Golfers are two – but in 1754, a group of 22 prominent citizens of St Andrews, including landowners and university professors, got together and formed the Society of St Andrews Golfers.

It is often erroneously thought that the society produced the first rules of golf, but that honour belongs to Edinburgh where the Honourable Company needed rules for a tournament for the Silver Club trophy, presented by the town council. That is why the document recording the original 13 rules of golf is to be found in the archive of Edinburgh City Council.

The Society of St Andrews Golfers adopted those rules and published them. Such was the prestige of St Andrews that its rules began to be adopted wherever golf was played. The Society would later become the Royal and Ancient Golf Club of St Andrews, gaining the title “royal” from King William IV in 1834.

Other innovations came at St Andrews. The course we now know as the Old Course – it only became “old” after the New Course was developed late in the 19th century – originally had 22 holes but in 1764 it was re-configured to have 18 and that became the standard number for all courses.

READ MORE: Rishi Sunak mentions 'Scottish nationalists' in speech about extremism

One of the best compliments which recognised St Andrews as the headquarters of golf came in the book Kay’s Portraits Of Edinburgh, several editions of which were produced in the early 19th century. Mostly written by James Paterson and edited by James Maidment with the brilliant etchings of John Kay, the Portraits mentions how Edinburgh golfers were reliant on St Andrews for their basic equipment.

The Portraits states: “The balls were brought from St Andrew’s, and retailed by the tavern-keepers at 6d painted, and 5d unpainted – so little had they advanced in price from the days of our Sixth James, when a ball cost 4s Scots (ie 4d sterling). The price of a club at present £13s 6d and of a ball, 2s.

“At St Andrew’s about 12 hands are constantly employed in making balls; and besides the quantity required for their own locality – averaging from 3000-4000 – upwards of 8000 are annually disposed of in other markets.

“There are two Golfing Clubs belonging to St Andrew’s. One of them, instituted in 1754, is composed of the nobility, gentry, and professors; the other, of a more plebian order of citizens. The former are distinguished by wearing red coats; the other, green.”

The R&A went from strength to strength and was recognised as the governing body of golf for many decades. Its rule dating from 1897 is why all cups on greens globally are 4.25ins (108mm) in diameter.

The development of The Open Championship and other tournaments made the R&A the force it still remains. The Home of Golf also had many innovative course designers and developers of clubs and balls. Golf made St Andrews famous, but then in a real sense St Andrews made golf.

To be included in this series on Scotland’s ancient towns, they must have established as a town, usually a burgh, before the Reformation in 1560. They need to have played a part in the history of Scotland and have a thoroughly researched history.

Anyone who wants to promote their ancient town for a column should email me at nationalhamish@gmail.com – do keep the suggestions coming.