The Duke of Cambridge has been appointed patron of the Thin Red Line Appeal on a visit to Stirling Castle.

Prince William, known as the Earl of Strathearn while in Scotland, visited the castle on Monday, where it is hoped £4 million in funding will be secured by 2019 for the redevelopment of the Argyll and Sutherland Highlanders Regimental Museum.

On arrival, the Duke was met by the Earl of Mar and Kellie, hereditary keeper of Stirling Castle, who presented William with the keys to the castle.

The Prince was escorted around the current museum by Colonel AK Miller, viewing key exhibits including The Thin Red Line painting which depicts the Battle of Balaclava during the Crimean War in 1854.

He spoke with pupils from the Queen Victoria School whose parents serve in the Armed Forces.

One of the pupils was 10-year-old Lily-Grace Methven, whose father Scott is the Queen's piper.

She said: "He is the sovereign's piper which is another word for the Queen's piper, and he plays most days and goes around the castle for the Queen and wherever she goes."

The Prince asked the pupils about school life, their future ambitions, and also which football team they support.

During the visit, the Prince also met Lieutenant Colonel Alexander Grant, 70, who is in a painting depicting fighting in Aden, now known as Yemen, in 1967.

Mr Grant said: "He seemed to be an extremely interested individual and easy to talk to and quite pleasant to chat with.

"I was the driver in this picture, which depicts 1967 in Aden. It was the insurgency just before we pulled out when Labour were in power and they decided we were going to give up."

Prince William officially launched the redevelopment of the museum and the Thin Red Line Appeal in a speech to trustees and guests.

He said: "I am honoured to be patron of the Thin Red Line Appeal, to ensure that the history of one of Scotland's most iconic regiments can be preserved as part of the nation's story here in Stirling."

The museum recently received news that it is to receive funding from the Heritage Lottery Fund, and William said he is "confident" the £4 million target is achievable.

Hundreds of tourists and school children lined up outside the museum in the castle's Inner Close, where Prince William was mobbed by excited pupils from Allan's Primary School for high-fives.

Col Miller said: "We were very fortunate to get Prince William as patron for the Thin Red Line Appeal.

"We have to raise £4 million to redevelop this museum because since we lost Military of Defence funding in 2012, we have to be entirely self-supporting and the museum and its current configuration, although a fantastic museum, does not earn us enough money.

"We want to ensure that in the new museum we don't just tell the story of the Argylls but also the story of the nation and of the United Kingdom because we fought Britain's wars in the colonial era, in the greater empire, in the post-colonial era and of course in recent conflicts, and we've got to keep that story alive.

"To have a very well-known and powerful figure as our patron is incredibly helpful and his enthusiasm for the whole project came across in spades today."