ORGANISED football matches were being played in castle courtyards in Scotland more than 500 years ago, research suggests.

Researchers at the Scottish Football Museum have found evidence of structured games involving a limited number of skilled players.

They said it showed that football in Scotland evolved into the modern game rather than being "invented" in the 19th century.

Mary Queen of Scots watched a game of football in 1568 at Carlisle Castle after fleeing from the Battle of Langside. A Scottish retinue of 20 people are said to have played a game for her amusement for two hours.

A letter describes the game as skilled, "with little foul play", according to museum curator Richard McBrearty.

Documents unearthed from the Lord High Treasurer's records from April 1497 show King James IV paid two shillings for a bag of "fut ballis".

Meanwhile, the world's oldest surviving football, dating to 1540, was found behind panelling in the Queen's bed chamber in Stirling Castle.

Mr McBrearty said: "It is research I have been involved with for about 10 years. We have been looking at the origins in Scotland and how it was played.

"We have been looking at small closed games that were played and evidence of structure and skill. We found fragments of information which show that there has been an evolution of the game which goes back hundreds of years."

He said he wants to challenge the perception that football was a violent and unregulated game involving hundreds of people before it was codified at Cambridge University in 1848.

The first association game in Scotland was between Queens Park and The Thistle in 1868. It lasted two hours and was 20-a-side.