The reign of King Donnchad I from 1034 was marred by failed military adventures, and he was killed in a battle with the men of Moray, led by Macbeth who became king in 1040. Macbeth ruled for seventeen years, peaceful enough that he was able to leave to go on pilgrimage to Rome; however, he was overthrown by Máel Coluim, the son of Donnchad, who some months later defeated Macbeth's stepson and successor Lulach to become king Máel Coluim III. In subsequent medieval propaganda, Donnchad's reign was portrayed positively while Macbeth was vilified; William Shakespeare followed this distorted history with his portrayal of both the king and his queen consort, Gruoch, in his play "Macbeth".