The son of King James III and Margaret of Denmark, he was probably born in Stirling Castle. When his father was killed at the Battle of Sauchieburn on June 11, 1488 the fifteen-year-old James took the throne and was crowned at Scone, Perthshire on June 24. The rebels who had gathered at Sauchieburn had done so with James supposedly as their figurehead. When James realised the indirect role which he had played in the death of his father, he decided to do penance for his sin. From that date on he wore a heavy iron chain cilice around his waist next to the skin each Lent as penance.
James IV quickly proved to be an effective ruler. He defeated another rebellion in 1489, took a direct interest in the administration of justice and finally brought the Lord of the Isles under control in 1493. James was well educated and it was claimed that he was fluent in Lowland Scots, English, Scottish Gaelic, Latin, French, German, Italian, Flemish, Spanish and Danish.
James recognized that peace between Scotland and England was in the interest of both countries, and so agreed treaty of “perpetual peace” in 1502 and marrying Henry VII’s daughter Margaret Tudor, on August 8, 1503, at Holyrood Abbey, Edinburgh.
When war broke out between England and France as a result of the Italian Wars, James found himself in a difficult position as his obligations under the Auld Alliance with France conflicted with the treaty made with England in 1502. The new king of England, Henry VIII, attempted to invade France in 1513, and James reacted by declaring war on England. Hoping to take advantage of Henry’s absence, he led an invading army southward, only to be killed, with many of his nobles and common soldiers, at the disastrous Battle of Flodden Field on September 9, ending Scotland’s involvement in the War of the League of Cambrai.
James IV is also significant in Scottish history as the last King of Scots who is known to have spoken Scottish Gaelic.