David Sellar, former Lord Lyon King of Arms and a leading Scottish legal historian, died at the weekend, it has been announced. He was 77.

Born and brought up in Glasgow, Mr Sellar studied history and Oxford and law at Edinburgh University. He was admitted as a solicitor in 1966 and worked as a legal assessor at the Scottish Land Court before joining the Faculty of Law at the University of Edinburgh in 1969, where he was to remain throughout his academic career.

He was the founding director of the Centre for Legal History at Edinburgh, and promoted Scots law, history and culture both within and outside the academic sphere. He served as literary director and then vice president of the Stair Society, chairman of the Society of Scottish Medieval and Renaissance Studies, chairman of the Council of the Scottish History Society, chairman of the Scottish Legal History Group, president of the Scottish Society of Northern Studies, and vice president of the Society of Antiquaries of Scotland. 

He also served as a member of the Ancient Monuments Board for Scotland, and on the councils of the Scottish Genealogy Society and the Heraldry Society of Scotland, and as vice president of the Society of Antiquaries of Scotland. His published work included studies of the Lordship of the Isles and the origins of many Highland families.

His expertise in Scots law, genealogy, clan history, and heraldry was recognised in his appointment by the Queen as Lord Lyon King of Arms in 2008, an office he held until he retired in 2014. From 2001 to 2008 he was Bute Pursuivant of Arms. On retiring as Lord Lyon he has made a Member of the Royal Victorian Order, and the University of Glasgow conferred an honorary LLD in 2016.

His former Edinburgh University colleague Professor Hector MacQueen described him on Twitter as "A great man in all senses of the words, whom I will miss very much indeed."