IT’S a telling little moment, caught on colour film. The Duke of Edinburgh is making his way towards his car, having finished his official visit to Edinburgh’s Canongate Kirk, when suddenly a cluster of choirboys, to whom he has been talking, overtake him by sprinting towards the vehicle. It’s as if they don’t want to go, not just yet.

The car is surrounded, too, by local women, some of whom have been waiting for well over an hour to catch a glimpse of the Queen’s consort.

This was the afternoon of Friday, June 26, 1953, on the occasion of the royal couple’s state visit to Scotland; it was the Queen’s first trip to Scotland after her Coronation. All eyes were on her, of course, but lots of people were also drawn to the Duke.

A tall, elegant figure in a navy blue lounge suit, clutching a bowler hat, he had arrived at Canongate Kirk to find a crowd of several hundred women and children waiting for him. He was greeted by the Rev Ronald Selby Wright, minister of Canongate and Edinburgh Castle, and inside the church, he unlocked and opened a new door that commemorated the Queen’s visit the previous year, and was presented with a replica key by Richard Long, one of the choirboys. “Does it fit?” the Duke asked Richard. “Would it work if I used it?” Replied the choirboy: “It would, sir – it has been tested”.

HeraldScotland: The Duke on a visit to Edinburgh's Canongate Kirk in June 1953The Duke on a visit to Edinburgh's Canongate Kirk in June 1953

Outside, he planted a tree, and chatted to the church officer, Mr J A Leask, who said he had once been a shipmate of King George VI when he was a midshipman.

Sixty-four long years later, on July 6, 2017, at the city’s Palace of Hoyroodhouse, the Duke, now 96, met gold-award holders from the Duke of Edinburgh’s Awards. It was possibly his last public engagement north of the border, as he had announced his plans to retire from public duties in the autumn. One of the award-winners, Rachel Brutin, 18, from Linlithgow, said: “It's lovely to meet him, he's an amazing man. It is quite poignant that this could be his last awards ceremony”.

In between these two encounters - with Richard Long in 1953 and Rachel Brutin in 2007 - lay many decades of public service by the Duke. He and the Queen were of course no strangers to Scotland, having made countless visits here over the years. They even returned to Canongate Kirk in 2016, attending the church’s regular Sunday service on July 3. The courtyard this time was lined by members of 142 (Second Edinburgh) Squadron ATC.

Balmoral, up in Royal Deeside, was where the Queen could be herself. Princess Eugenie, speaking on a TV documentary in 2016, said of Balmoral: “It’s the most beautiful place on earth. I think Granny is the most happy there. I think she really, really loves the Highlands … It’s a lovely base for Granny and Grandpa, for us to come and see them up there; where you just have room to breathe and run’.”

It was often observed that the Duke, as head of the royal family, took the lead behind closed doors, and also took charge of family barbecues at Balmoral. And when the Queen first became monarch, she tasked Philip with reorganising her estates at Balmoral and Sandringham, which he is said to have done with ruthless efficiency.

A landmark royal visit to Scotland came in May 1977, when the Queen celebrated her Silver Jubilee. At Hampden Park the royal couple watched the first half of a Glasgow Select-English League challenge match, and shook hands with such luminaries as Sir Matt Busby, Don Revie and Willie Ormond.

At Kelvingrove Art Gallery and Museum the Duke was in good form, asking “Are you are all waiting to get in?” of the masses waiting outside, and bantering with a group of cleaners who had been working until 1am. At Govan Shipbuilders he said he would take up their invitation to visit the yard as soon as he could. And during a walkabout he was happy to pause while Annette McGregor, 15, of Queenslie, took his picture with her Polaroid camera. He chatted with her for a minute as the photograph developed.

The Duke, of course, was known for his sometimes robust sense of humour and straight talking. In a letter to The Herald in May 2017, Jimmie Macgregor wrote that, attending the Duke of Edinburgh Awards, he had learned of the Duke’s standard reply to the oft-repeated question, “How was your flight?” - “Have you ever been in an aeroplane?” he would ask. “Well, it was like that”.

Many of the Duke’s gaffes occurred in Scotland. On walkabout in Oban, in 1995, for example, he asked a driving instructor, "How do you keep the natives off the booze long enough to get them through the test?”

The following year, as he responded to calls to ban firearms in the aftermath of the Dunblane shootings, he asked: "If a cricketer, for instance, suddenly decided to go into a school and batter a lot of people to death with a cricket bat, which he could do very easily, I mean, are you going to ban cricket bats?"

Visiting a factory near Edinburgh in 1999, he indicated a quaint old fusebox and said: It looks as if it was put in by an Indian.”

On Stornoway, in 2002, the Duke told a young female police officer who was wearing a bullet-proof vest that she looked “like a suicide bomber”. And in 2010, speaking to Annabel Goldie, the then leader of the Scottish Conservatives, he pointed to some tartan and asked her: "Do you have a pair of knickers made out of this?”

One of his most eyebrow-raising comments overseas was made on an official visit to China in 1986. Chatting in the city of Xian to a a group of British exchange students he said: “If you stay here much longer you’ll all be slitty-eyed.” An international outcry ensued. The student who revealed the comment to journalists was studying at Edinburgh University at the time. (He later apologised for his indiscretion).

The Duke was a tireless supporter of hundreds of charities across the UK, and in 2017 the Dean of the Chapel Royal in Scotland, the Very Rev Professor Iain Torrance, thanked "our witty and eagle-eyed Duke of Edinburgh" for his "unstinting" promotion of organisations across the country. And the Duke of Edinburgh Award, founded by him in 1956, enriched the lives of millions of young people.

Away from the spotlight, the Duke was an experienced collector of contemporary Scottish art for the royal family’s private apartments and guest quarters at the Palace of Holyroodhouse.

As The Herald reported in August 2000, these rooms “are brightened by an array of landscapes, seascapes and still lifes by many of Scotland’s leading artists of the later twentieth century”.

Speaking on the eve of a public exhibition in Glasgow of a selection of the paintings, the Duke said he started his collection in the late 1950s and is still adding to it. Explaining its origins, he said:''It's to do with this place,'' referring to the palace. ’'It was only made habitable, after a long period, by King George V and Queen Mary.'' The modernisation provided furniture but ''no pictures to speak of''. There were a lot of prints but these were not ''very interesting or colourful’’. So he started visiting the annual Royal Scottish Academy exhibition each July when he was in Edinburgh, ''just to look around’’.

Another side to the Duke emerged during a Silver Jubilee walkabout in Dundee with the Queen in 1977. His eye was caught by the windows above the venerable Windmill Bar. The pub regulars were so taken with him that they penned a poem, which was delivered to the Duke via the Royal Protection Squad.

Days later, they received a poem by the Duke himself, detailing some of the Scottish places they had visited and adding: “But the sight the most glorious in store for us to see/ Was the friendly old Windmill in Hilltown, Dundee…”