Secretary to Princess Margaret and chief of the Clan Napier;

Born: December 5, 1930; Died: March 15, 2012.

Lord Napier, who has died aged 81, inherited one of the ancient titles of Scotland in 1954 and among his forebears was John Napier of Merchistoun, the inventor of logarithms.

Lord Napier was in the Scots Guards and then served the Royal Household first as equerry to the late Duke of Gloucester and for 30 years to Princess Margaret. He was much involved in the stormy events surrounding her divorce from Lord Snowdon and, as one royal author has written: "Lord Napier, as equerry, helped to steer his emotional charge through the most difficult passage in her life."

Charlie Napier, president of the Clan Napier Society, has spoken warmly of his clan chief: "He was very active and always supportive in matters concerning the clan.

"He was an excellent host and despite being wheelchair-bound he hosted gatherings in 1993 and 2000 in Selkirk village hall for the American Napier Society. Lord Napier was a charming gentleman of the old school; very good company."

In fact through his wife, Delia, Lord Napier had family connections with the royal family. Her maternal grandfather was Lord Blackburn (a Lord of Session) whose wife, Lady Constance Bowes-Lyon, was the daughter of the 13th Earl of Strathmore. Lady Napier was therefore a first cousin once removed of the Queen Mother, and a second cousin of The Queen.

Francis Nigel Napier was the son of the 13th peer and after Eton and Sandhurst he was commissioned into the Scots Guards in 1950. He served in Malaya but contracted polio and served as an adjutant in the 1st Battalion from 1955-57. For two years from 1958 he was equerry to the Duke of Gloucester but then retired from the army with the rank of Major.

When he inherited the title Lord Napier discovered that Thirlestane Castle, by Ettrick, was riddled with dry rot and was informed that the cost of restoration was prohibitive. Consequently, the castle was demolished.

Lord Napier fulfilled various posts – with the Commonwealth Relations Office and a Conservative Whip in the Lords – but in 1973 he was appointed comptroller and equerry to Princess Margaret: throughout Lord Napier's keen sense of integrity and discretion proved invaluable to the Princess.

His years with Princess Margaret (1973-1998 and then as treasurer until her death in 2002) necessitated Lord Napier spending much time in the south. He and his wife often accompanied the Princess to Villa Jolie, her private home on Mustique. Throughout this period his discretion was further in demand when the Princess had a well-publicised affair with Roddy Llewellyn.

In recent years Lord Napier moved south to be closer to his family, although he remained closely in touch with clan affairs – significantly the funeral is in Wiltshire but he will be buried in the kirk at Ettrick in the ancient burial tomb of the Napiers.

Lord Napier was a Member of the Royal Company of Archers, a Deputy Lieutenant, a Justice of the Peace and a County Councillor for Selkirkshire (1946-48).

He was president of the Border Area Council, the British Legion and served on the committee of the Standing Council of Scottish Chiefs. He acted as Purple Staff Officer at the state funeral of Sir Winston Churchill in 1966.

Lord Napier married Delia Mary Pearson in 1958. She and their two sons and two daughters survive him.

The titles are devolved to their elder son, Francis, Master of Napier.