The Royal Yacht Britannia arrived at a dry dock several hours later than planned after fire crews were called when it started taking on water while being moved.
The yacht, which is now a tourist attraction in Edinburgh, developed a leak in a door seal yesterday which caused it to tilt on its starboard side.
It was moved to a dry dock across the harbour in Leith for repainting after fire crews pumped water from the vessel.
A spokesman said it was pulled by a tug and arrived at about 3.30pm. He said Britannia was now securely tied up and an investigation would be carried out into the leak.
He added: “Moving the yacht obviously took longer than expected after suffering a setback but it is now mission complete.
“It all went smoothly once the water was pumped off the boat and it started to move. So, all’s well that ends well.”
There was not thought to be any damage to the yacht and all its contents had been removed before the move got under way, he added.
Britannia served the Queen for 44 years, carrying her and the royal family on 968 official voyages before being taken out of service in 1997.
In July, the Queen’s grand-daughter Zara Phillips and England rugby star Mike Tindall hosted a pre-wedding party on board the vessel which was attended by Princes William and Harry and the Duchess of Cambridge.
Yesterday was the first time in 14 years the vessel had been moved.