<P> In external affairs, William had some successes . In 1091 he repulsed an invasion by King Malcolm III of Scotland, forcing Malcolm to pay homage . In 1092 he built Carlisle Castle, taking control of Cumberland and Westmorland, which had previously been claimed by the Scots . Subsequently, the two kings quarrelled over Malcolm's possessions in England, and Malcolm again invaded, ravaging Northumbria . At the Battle of Alnwick, on 13 November 1093, Malcolm was ambushed by Norman forces led by Robert de Mowbray . Malcolm and his son Edward were killed and Malcolm III's brother Donald seized the throne . William supported Malcolm's son Duncan II, who held power for a short time, and then another of Malcolm's sons, Edgar . Edgar conquered Lothian in 1094 and eventually removed Donald in 1097 with William's aid in a campaign led by Edgar Ætheling . Edgar recognised William's authority over Lothian and attended William's court . </P> <P> William made two forays into Wales in 1097 . Nothing decisive was achieved, but a series of castles was constructed as a marchland defensive barrier . </P> <P> In 1096, William's brother Robert Curthose joined the First Crusade . He needed money to fund this venture and pledged his Duchy of Normandy to William in return for a payment of 10,000 marks--a sum equalling about a quarter of William's annual revenue . In a display of the effectiveness of English taxation, William raised the money by levying a special, heavy, and much - resented tax upon the whole of England . William then ruled Normandy as regent in Robert's absence . Robert did not return until September 1100, one month after William's death . </P> <P> As regent for his brother Robert in Normandy, William campaigned in France from 1097 to 1099 . He secured northern Maine but failed to seize the French - controlled part of the Vexin region . According to William of Malmesbury he was planning to invade Aquitaine at the time of his death . </P>

Who became the most hated king in english history