Fergus's fall from power came in 1160, after Malcolm IV, King of Scotland settled a dispute amongst his leading magnates and launched three military campaigns into Galloway. The reasons for the Scottish invasion are unknown. On one hand, it is possible that Fergus had precipitated events by preying upon Scottish territories. In the aftermath of the attack, the king came to terms with Somairle which could be evidence that he had either been allied with Fergus against the Scots or that he had aided in Fergus's destruction. In any case, Fergus himself was driven from power, and forced to retire to the abbey of Holyrood. He died the next year. The Lordship of Galloway appears to have been partitioned between his sons, Gilla Brigte and Uhtred, and Scottish influence further penetrated into Galloway.