The Scots were reluctant to accept his English mother Margaret Tudor as Regent, and after her remarriage in 1514 they replaced her with James IV's half-French cousin, the Duke of Albany.
Queen Margaret's tempestuous private life complicated her son's childhood, and after she divorced her second husband, Archibald Douglas 6th Earl of Angus, the Earl kidnapped young James.
For two years he held him captive, showering him with gifts and introducing him to a round of unsuitable pleasures. James loathed his former stepfather, and finally managed to escape in 1528, to rule by himself.
James' personal rule began by savagely pursuing his opponents and he hounded the Earl of Angus out of Scotland. James combined suspicion of nobles with a popular touch, travelling anonymously among Scottish people as the 'Gudeman o'Ballengeich'.
John Knox described him thus: 'he was called of some, a good poor man's king; of others he was termed a murderer of the nobility, and one that had decreed their whole destruction'.
In 1536 he decided to marry. A highly strung, intelligent man who alternated between black depression and bouts of feverish energy, he had already fathered at least nine illegitimate children by a series of mistresses.
He now chose as his wife Princess Madeleine of France, for he was eager to strengthen 'the Auld Alliance' against England. The Princess was tubercular, and she died in his arms on 7 July 1537, seven weeks after her arrival in Edinburgh.
In 1538 he married another French lady, the widowed Mary of Guise, tall, well-built and already the mother of two sons. She had two more sons by James but they both died in infancy within hours of each other in 1541.
James V's uncle, Henry VIII, who had by now broken with the Roman Catholic Church and dissolved the monasteries, was urging him to do the same. He refused to listen to his uncle's persuasions and in 1542 failed to go to an arranged meeting with Henry at York.
Furious, Henry launched an invasion of Scotland. Already ill, James marched south with his army, to defeat at the Battle of Solway Moss on the Scottish/English Border, on 24 November 1542.
Although he himself had not been present at the battle, James suffered a complete nervous collapse. Retiring to Falkland Palace in Fife he took to his bed with a high fever and, when a messenger came to tell him that his pregnant queen had given birth to a daughter instead of the hoped-for son, he believed that the Stewart dynasty was at an end.
'It cam wi' a lass and it will gang wi' a lass', he said, remembering how the crown had come to his family through Marjorie Bruce and fearing that no woman could ever rule his troubled nation. Six days later, he was dead.