The QE2 ran aground today heading into its home port for the final time.
The ignominious start to today for the 70,000 ton vessel began when it ran onto a sandbank just off the Isle of Wight as it headed for Southampton.
Two tugs assisted the vessel and with the tide rising, the ship, with 1,700 passengers and 1,000 crew aboard, refloated and was able to proceed to Southampton.
Eventually the vessel docked around 15 minutes late, with Cunard officials saying that all today's events, including a visit to the ship by the Duke of Edinburgh ahead of its departure on its final voyage to Dubai, would go ahead as planned.
Cunard spokesman Eric Flounders said: "She touched a sandbank called Brambles but with the tide rising she was able to get away.
"We are not aware at this stage of any damage to the vessel and everything is proceeding today as planned. We don't know exactly what happened for the vessel to get stuck."
Launched by the Queen on the Clyde in 1967, the QE2 has been on a Mediterranean cruise which finished early today.
Tonight - at around 7.15pm - the ship will leave Southampton for the final time on a sold-out last voyage to Dubai where it is due to become a permanently docked floating hotel.
The Duke of Edinburgh, making his seventh visit to the ship, will attend on-board ceremonies, watch fly-pasts and observe at 11.00am, the Remembrance Day two minutes silence to mark the 90th anniversary of the Armistice.
The ceremony will include the dropping from a Tiger Moth aircraft of one million poppies over the QE2.
After the ceremony Prince Philip will meet QE2 crew members who travelled on the vessel when it was used as a troop ship in the Falklands War in 1982.
The Duke will also meet long-serving staff, as well as the former captains of HMS Ardent, Antelope and Coventry - ships that were lost in the Falklands campaign.
The Duke will also watch a fly-past by a Harrier jet from the aft decks of the QE2.
After the vessel moves off tonight it will stop for a time and a pre-recorded message from her master Captain Ian McNaught will be broadcast on a specially-erected screen in Southampton's Mayfair Park.
The QE2 has survived a number of incidents during its near-40 years of service.
These have included running aground off the coast of Massachusetts, breaking loose from its moorings during a gale in Cherbourg and striking a pier, hitting a reef at Nassau and losing power after a boiler oil leak.
The QE2 has sailed nearly six million nautical miles, gone round the world 25 times, crossed the Atlantic more than 800 times and carried more than 2.5million passengers.
Today's final voyage to Dubai was sold out almost instantly, with the highest-price berths going for more than £28,000.
Seen off tonight with a firework display and by crowds expected to reach many thousands, the ship will reach Dubai on 26 November and will then be handed over to the Nakheel company, which is part of the Dubai World company which bought the vessel for around £50m.
Over the next few months the ship will undergo extensive refurbishment before taking up a permanent docking on a specially-constructed berth on the Palm Jumeirah, the largest manmade island in the world.
A spokesman for Solent Coastguard said they were alerted to the ship being aground at the entrance of Southampton Water at 5.26am today.
Five tugs were sent out to assist her getting off the sandbank, he added, and she was pulled off just before 6.10am.
The spokesman said: "She has been refloated and is under way under her own power and heading back to her berth in Southampton."
He added: "She had only partially gone aground, and the tugs pulled her off."
The ship was heading back to Southampton from a 15-night Mediterranean cruise, with a full complement of passengers and crew.
A Cunard spokesman said earlier that no-one had been injured during the grounding.
He added: "No-one on board has been injured. A lot of people will have been in bed when it happened and not have noticed."
The ship was due to dock at 6.30am.
Solent coastguard said the winds were blowing from the south west at force seven, or 30mph, at the time of the grounding, with a moderate swell.
Police have urged those wanting to see the ship in port to arrive early.
Among the passengers carried by the ship in its many years of service were the Beatles. Tribute band the Silver Beatles will be performing live tomorrow at Mayflower Park.