A number of medieval spectacles have been held
One of the centrepiece events of Scotland's year of Homecoming has taken place in Linlithgow.
About 10,000 Visitors to Party at the Palace were given a taste of life as it would have been in 1503.
The year was a momentous one, with James IV marrying Margaret Tudor - and Scotland signing "the Treaty of Perpetual Peace" with England.
Celebrations included an 80-strong procession escorting the "king and his new queen" to Linlithgow Palace.
The procession featured dozens of courtiers and the followers of four great noble families whose champions then took part in a jousting contest.
The event was attended by First Minister Alex Salmond, who was born and raised in Linlithgow.
He said: "The wedding of King James IV and Margaret Tudor, ultimately leading to the Union of the Crown, is undoubtedly one of the most significant moments in Scotland's history.
"This weekend's celebrations at Linlithgow are the perfect example of how Homecoming Scotland is encouraging, supporting and raising awareness of Scotland's rich history and heritage to local, national and international audiences."
John Graham, chief executive of Historic Scotland, said the party was one of the largest events it had ever staged.