James IV. (1488-1513) was born in 1473. He was only in his sixteenth year when he was induced to join the disaffected barons in their rebellion against his father, but there is no reason to believe that he was a mere passive tool in their hands. The remorse which he felt on learning of his father's murder, shown by his wearing an iron chain round his waist and submitting to various other austerities by way of penance, affords conclusive evidence of his consciousness of guilt. His confederates in the rebellion, as might have been expected, turned their victory to their own advantage. They took possession of all the most important offices of state, of the money in the royal treasury, and of the late king's jewels. They had even the effrontery to accuse the loyal barons of treason, and to deprive them of their estates, which were divided among the leading conspirators.
When the young king reached maturity he exhibited great energy and good sense in the administration of public affairs, in vindicating law and punishing crime, in encouraging shipbuilding, and in developing the agriculture and manufactures of the country. He gradually withdrew his confidence from the barons who had used him as a tool to gain their own selfish ends, and transferred it to Sir Andrew Wood (q.v.) and other trustworthy counsellors. James vigilantly guarded against the encroachments of the papal court, and firmly asserted the ecclesiastical independence of his kingdom. His romantic and rash disposition induced him to support the cause of the impostor, Perkin Warbeck, who visited Scotland in 1495, and to invade England in his behalf. However, in 1497 a truce for seven years was concluded between the two kingdoms, and in August 1503 the Scottish king was married to Margaret, eldest daughter of Henry VII.—an alliance which led ultimately to the union of the crowns. James's affable manners, frank disposition, and splendid hospitality made him highly popular among his subjects, and his friendship was courted by foreign sovereigns. Henry VIII., who ascended the English throne in 1509, joined the league against France, while James adhered to the ancient alliance with that country. Petty disputes arose between the borderers of the two countries, and inroads were made on both sides. James was indignant at the capture of two privateers commanded by the famous Andrew Barton, who fell in an engagement with two English men-of-war, and all redress was refused by Henry. The French king, hard pressed by the Spanish and English armies, made strenuous efforts to obtain assistance from the Scots, and the French queen addressed a letter to James calling herself his mistress, and entreating him for her sake to advance three feet into English ground. He was unfortunately induced to comply with her request, and, disregarding the entreaties of his queen and the remonstrances of his counsellors, he summoned the army of his kingdom and invaded England in the summer of 1513. He lingered about the Borders until the Earl of Surrey had collected a powerful army to repel the invasion. A battle took place at Flodden (q.v.), 9th September, in which the Scottish king and the flower of his nobility and gentry lost their lives. James possessed excellent abilities and great accomplishments, but he was headstrong, obstinate, and impatient of contradiction, licentious, fond of pleasure, and profuse in his expenditure. See Gregory Smith's Days of James IV. (1890).