Minister;

Born: November 22, 1939 ; Died: May 22, 2012.

Rev Allan Macpherson, who has died at the age of 72, was an outstanding school chaplain, first at George Heriot's in Edinburgh and later at the city's Merchiston Castle.

He was born in Glasgow and educated at Hillington Primary School and then at Hutchesons' Grammar School, where he not only succeeded academically but excelled on the cricket field. In his final year he had the second-best bowling figures in schools' cricket.

If cricket gave him one of his lifetime passions, it was the Boys' Brigade (where he earned the prestigious Queen's Badge) which gave him the other. He learned to play the bagpipes, and became an accomplished piper, never happier than when going to Highland games, especially those of the Clan Macpherson in Newtonmore.

After school, he went to Glasgow University where he took an arts degree in history and then studied for the ministry. He was awarded a year's Peter Marshall scholarship at Princeton University (named after the distinguished minister of New York Avenue Presbyterian Church and chaplain top the United States Senate). However, to the amazement of his contemporaries, he preferred instead to become the assistant minister of Paisley Abbey, where the first-class music tradition was a great attraction.

Although he had always intended to be a parish minister, it was one of his duties, taking assemblies and RE classes at Paisley Grammar School, which sowed the seeds of a career in education.

His friend and mentor Professor William Barclay advised him to undertake teacher training and he studied at Moray House, and then was appointed chaplain of George Heriot's school, where he was not only involved in teaching but was prominent in the campaign to keep the school open when it was under threat. He coached cricket and became a qualified MCC coach. He was also involved with the school's rugby teams.

After what he called "15 wonderfully fulfilling years" at Heriot's, he typically felt that he should pay something back to the Church of Scotland and became minister of Huntly Cairney Glass.

He served as moderator of Huntly Presbytery, president of Huntly Rotary Club, and chaplain to the local RAF station. He was a Church of Scotland representative on the Grampian Region Education Committee and liked to say that this gave him a unique insight into the state education system and, not least, "to the devious machinations of politicians".

In what a friend described as a flourishing ministry there for 10 years, he was headhunted by the then headmaster of Merchiston Castle School, David Spawforth, who had originally tried to persuade him to become chaplain there when he left Heriot's. On this occasion, however, he was successful, and Mr Macpherson joined the staff of Merchiston in 1993.

While he was a fine parish minister, his heart was in teaching and in the sporting life of a school. He was to remain at Merchiston for 18 years. Compulsory services on a Sunday morning were perhaps not the most eagerly anticipated activity of the school week, but Mr Macpherson's relaxed formality and the respect and affection in which he was held by the boys clearly contributed to an appropriate sense of worship to which visiting preachers were often invited.

During his Merchiston years he was in charge of the pipe band of more than 100 boys, organising trips to Brittany and Moscow. When he retired, a tune, Macpherson's Farewell to Merchiston, was composed for him.

He introduced the Cameron tartan as the band's uniform in honour of founder Charles Chalmers, brother of the theologian and leader of the Free Church, Thomas Chalmers. He coached rugby and cricket, including refereeing and umpiring. Away from the school he helped Dr Ronald Selby Wright in the Canongate Boys' Club.

Allan Macpherson loved music. He sang in the Edinburgh Royal Choral Union. He played golf, and was noted for always using an iron club off the tee, an idiosyncrasy which earned him the nickname "the Iron Duke". He also had a great, if often irreverent, sense of humour.

He is survived by his wife Mary, daughter Lorna and son Robin.