Battle of Pitgaveny
The Battle of Pitgaveny, also called the Battle of Bothnagowan, was fought between the forces of Duncan I of Scotland and Macbeth, at the time the ruler of Moray, on 14 August 1040. The battle was part of a campaign by Duncan into Moray against Macbeth. It was fought at Bothganown, modern day Pitgaveny, near Elgin. The battle was a victory for Macbeth and resulted in Duncan's death. Following the battle Duncan's sons fled Scotland, but both later returned. Malcolm Canmore took the throne after defeating Macbeth in 1057, and Donald Ban was chosen as king after Malcolm's death in 1093. Background 
Duncan I became king of Scotland after the death of his grandfather, Malcolm II, in 1034, and also held the title king of Strathclyde. Malcolm was the last descendant of the male lineage descended from Kenneth I to hold the kingship, and Duncan ascending to the throne on a claim descending from his mother was highly unusual for the period. Another challenger to the Scottish throne was Macbeth, who had ruled Moray since 1032. Macbeth is described as holding the title of dux, which would later mean a Duke, but at the time was closer to the Roman meaning of a war leader. This would suggest Macbeth was seen as a powerful figure in Scotland, and the isolation of Moray caused by the Mounth allowed Macbeth and his predecessors as rulers of Moray to exercise a degree of political independence. Attempts by Duncan to reclaim the northerly regions of Caithness and Sutherland for Scotland ended in defeat to Thorfinn, the Earl of Orkney. In 1038 Duncan launched an invasion of England in response to Eadulf, Earl of Northumbria's attack on Cumberland the year before. This invasion ended in defeat for Duncan at the siege of Durham. These failures led to discontent in Scotland and opposition to Duncan's rule focused around Macbeth, whose loyalty to Duncan had waned. Battle 
in 1040 Duncan led a campaign against Macbeth in Moray. This campaign ended in defeat for Duncan at Bothnagowan, modern day Pitgaveny, near Elgin, where he faced Macbeth's forces on 14 August. Duncan was either killed in action, or later died at Elgin Castle of wounds sustained in the battle. Aftermath 
Following Duncan's death Macbeth became king of Scots, and in 1045 he defeated and killed Duncan's father Crínán, the abbot of Dunkeld. Duncan's sons, Malcolm Canmore and Donald Ban both fled, with Malcolm finding refuge in England. In 1054 Siward, Earl of Northumbria, led an army into Scotland in support of Malcolm and defeated Macbeth at the battle of Dunsinane. Malcolm would defeat and kill Macbeth at the battle of Lumphanan in 1057, taking the crown after killing Macbeth's stepson Lulach 18 weeks later. Upon Malcolm's death at the battle of Alnwick in 1093 Donald was chosen to be the king of Scots. Donald exiled Malcolm's sons, one of whom, Duncan II would briefly dethrone Donald in 1094 before another, Edgar, seized the throne in 1097 with the aid of William II of England. References

Sources 
 
 
 
 
 
 
 
 

Pitgaveny
11th century in Scotland
History of Moray