The son of the troubled King of Scots, Robert III, young James was sent to France for his own safety. However, he was captured by pirates who took him to the English king, Henry IV. News of this proved the last blow for his father, who died soon afterwards. Whilst in captivity, James was educated at the English court. He was finally freed in 1423, probably under the influence of Lady Joan Beaufort, who was a close relative of Henry IV and whom James married just weeks after his release. The couple moved back to Scotland where James set out to regain control over his troublesome nobility, who had grown too powerful in his absence. In doing so he made many enemies and on 20 February 1437 a group of conspirators forced their way into his rooms and stabbed him to death.