The Queen helped Musselburgh Racecourse celebrate its 200th anniversary in a special visit on Friday.

Her Majesty unveiled a sculpture to mark two centuries of racing at the site.

She had two horses running in separate races but neither made it across the finish line first.

Elementary and Forecaster came third in their respective races, the Silver Arrow and the Bicentenary Cup.

Both were ridden by jockey Donnacha O'Brien, who was wearing the Queen's purple and gold colours and later met the monarch.

Members of the public at the packed event looked on as the Queen and Duke of Edinburgh appeared at the Queen's Stand.

They were unable to see her reaction to the results as she chose instead to watch the races from indoors.

The Queen's broadest smiles were, however, saved for the smallest horses in the arena.

She met up again with beloved Shetland ponies Cruachan IV - the mascot of the Royal Regiment of Scotland - and his retired predecessor Lance Corporal Cruachan III, now aged 28.

Pony Major Mark Wilkinson said of the current army mascot: "He welcomes Her Majesty to Balmoral every year for her summer holiday, and any other time that Her Majesty is in Scotland she likes to see him."