Alan Hostarius was the son of Thomas de Lundin, a grandson of Gille Críst, Mormaer of Mar. His mother's name is unknown, but she was almost certainly a daughter of Máel Coluim, Mormaer of Atholl, meaning that Alan was the product of two Gaelic comital families. Alan was one of the most important political figures of 13th century Scotland, and in fact effectively ruled the country at several points during the minority of Alexander III. Through his father Thomas, he inherited the office of hostarius, protector of the king's property. Alan probably participated in the campaign to crush the insurrection of Meic Uilleim in 1228-29. By 1233, and probably before, Alan was given control of Urquhart on the shores of Loch Ness. Alan was almost certainly responsible for the earliest motte phase of Urquhart Castle. At the same point in time, between 1233 and 1235, Alan was styling himself "Count of Atholl". It has often been thought that, after the death of Thomas of Galloway, Earl of Atholl in 1232, Isabella, Countess of Atholl, married Alan. This however, rests solely on the appearance of Alan's styles. However, as Matthew Hammond has shown, this is more likely to refer to fact that Alan, as a grandson of Máel Coluim, Earl of Atholl, probably sought to inherit the province; by January 9, 1234, King Alexander seems to have recognized this style. However, by the time of a charter of July 7, 1235, the style had disappeared and Alan was never called "Count" again. Alan, like his father Thomas, would also challenge the rights of the Mormaers of Mar. Alan was descended from Gille Crist, Mormaer of Mar. However, Gille Críst's descendants had been excluded from inheritance by the line of Morggán, Mormaer of Mar, who were monopolizing the comital title. Alan tried and failed to oust Uilleam from his title. It would be the greatest failure of Alan's career that he failed to rise to comital rank. Alan's illustrious career was marked by intense rivalry with the Comyns. The rivalry was a national phenomenon, and represented a larger factional conflict within the kingdom. There may have been some reconciliation towards the end of his life. Alan was made Justiciar of Scotia along with Alexander Comyn, Earl of Buchan, and campaigned with the latter in two expeditions against the Norwegians. Alan even witnessed one of Earl Alexander's charters in 1272. Alan spent many of his later years in England. During the minority of Alexander III, Alan had courted the favor of King Henry III of England in an effort to stay in power. The King of the English even gave Alan his own English manor, Bolsover. He died in 1275. He was buried in the Abbey of Coupar Angus.