Prince Philip regularly travelled to Scotland with Her Majesty The Queen, including participating in Royal Week at the Palace of Holyroodhouse in Edinburgh, which often included a garden party with serving Army personnel.
Every year the couple spent their summer break at the Royal Castle at Balmoral, often guarded by soldiers from the 5th Battalion, the Royal Regiment of Scotland.
The Royal Regiment of Scotland Pony Major, Corporal Mark Wilkinson, who met the Duke regularly during his visits to Balmoral, said: "Each year on the Loch at Balmoral the staff took part in a Raft Race and one year I was honoured enough to be in charge.
"Teams from the Royal Household, Royal Guard, Police, Ghillies and others all competed to get to the other side as quickly as possible.
"The Duke of Edinburgh would stand with us and roar with laughter at the chaos unfolding in front of him."
The Duke's affiliation with several regiments and corps meant he would often visit Scotland to meet the troops and mark major occasions.
He was Royal Colonel of 4th Battalion, Royal Regiment of Scotland, and in 2011 he presented them with their new Colours in an aircraft hangar at what was then RAF Kinloss on the Moray Firth.
Prince Philip was Colonel in Chief of the Royal Mechanical and Electrical Engineers (REME) and visited 2 CS REME in Leuchars Station in 2015, shortly after their return from Germany.
He was also the Colonel in Chief of the Rifles from their formation in 2007 until 2020. One of their battalions, 3 RIFLES, is resident at Dreghorn Barracks, Edinburgh.
The Duke was also the Royal Colonel of the City of Edinburgh University Officer Training Corps (CEUOTC) until 2015.
He visited to watch them take part in leadership development exercises and army skills lessons in 2014, reportedly leaving a prior appointment early as he was so keen to meet the officer cadets and learn about what they were doing.
The then Commanding Officer of CEUOTC, Lt Col Gordon Mackenzie, said: "We were very pleased that the Duke came to see us.
"It isn't every UOTC which gets to host a royal visit and all the officer cadets were very keen to meet him.
"He had an association with us dating all the way back to 1953 and was a fantastic example of what it is to serve in the military.
"The officer cadets really related to what he had done in service of his country."
The Duke of Edinburgh served for more than a decade in the Royal Navy and was mentioned in dispatches during World War Two.
A number of gun salutes were fired following Prince Philip's death, including one by 105 Regiment, Royal Artillery at Edinburgh Castle.
Cover image: The Duke of Edinburgh meeting with soldiers from The Highlanders, 4th Battalion the Royal Regiment of Scotland in Edinburgh Castle's Great Hall in 2014 (Picture: MOD).