Prince Charles, accompanied by his wife - the royal couple are known as the Duke and Duchess of Rothesay north of the border - took the salute in Abbey Strand after the parade had passed the Scottish parliament and other famous civic buildings.
The troops entered the forecourt of the Palace of Holyroodhouse, where Prince Charles made an inspection.
The parade was led by sailors from ship’s companies of Scottish-based submarines, and vessels that are being built on the Clyde. Army personnel included the Scots Guards.
They were all in the capital both to mark Her Majesty The Queen’s Diamond Jubilee year and for members of the public to show their appreciation for the Armed Forces.
The Royal Navy’s most senior officer in Scotland, Rear Admiral Chris Hockley, Flag Officer Scotland, Northern England and Northern Ireland, was among the dignitaries at the parade.
Lieutenant Eleanor Hollingworth, the Rear Admiral’s Flag Lieutenant, said:
Members of the Royal Navy have been proud and delighted to lead the parade today in honour of Her Majesty The Queen’s Diamond Jubilee.
It is a day of celebration and we are honoured to have been part of this once-in-a-lifetime event - it is an occasion which we will all remember.
The parade stepped off from Edinburgh’s historic castle at noon and marched down the Royal Mile.
Lieutenant Hollingworth added:
It has been fitting to mark this historic event at the heart of Scotland’s ancient capital city and it’s a great honour that we have been received by His Royal Highness alongside our colleagues from the Army and the Royal Air Force.
Hundreds of members of the public watched the pageantry as the parade progressed along the Royal Mile and then at the palace gates.
Music was provided by the Pipes and Drums of the Royal Highland Fusiliers, 2nd Battalion The Royal Regiment of Scotland and the Band of the Royal Regiment of Scotland.