Uilleam of Mar, or Uilleam mac Dhonnchaidh (Anglicized: William, Duncan's son), was perhaps the greatest of the mormaers of Mar ruling from 1244 to 1276, also known as Earl of Mar.
Uilleam was responsible for the construction of Kildrummy Castle, the greatest castle to have been built in 13th century northern Scotland. It is one of the few examples where a native Scottish magnate built a large-scale fortification, something normally practiced by the incoming French.
Uilleam, more than any of his predecessors, participated in Scottish and even British-wide politics, becoming a leading figure in the royal regime of Alexander II, and the minority of Alexander III. By 1244, Uilleam had married into the Comyn house, the fastest rising French family in the Scottish kingdom. He married Elisabeth Comyn, the daughter of William Comyn, jure uxoris Earl of Buchan. The Comyn-Mar alliance helped fight off the ambitions of the Durwards, who were then in prime favor with the king.
Alan Durward used his descent from a daughter of Gille Críst to contest Uilleam's right to the Mormaerdom, but Uilleam successfully held off these claims. Uilleam and the Comyn Earl of Menteith then launched accusations of treason towards Alan while at the court of Henry III of England at York.
Uilleam engaged in supplementing his power on a nationwide basis. He held the post of Sheriff of Dumbarton between 1264 and 1266, a post which opened up connections in the western Highlands. Uilleam was able to marry his younger son Donnchadh to Cairistíona Nic Ruaidhrí, daughter of the Hebridean chief Ailéan mac Ruaidhrí, a man who had been one of the principal supporters of Norwegian cause against the Scottish Crown in the 1260s.