The world-famous QE2 liner has left Southampton on its last ever voyage, as thousands of well-wishers looked on from the quayside, BBC reported.
The ship began to slip its berth at 1915 GMT, followed by a spectacular fireworks display.
The 41-year-old liner is being taken out of service and turned into a floating hotel in Dubai.
Earlier one million Remembrance Day poppies were dropped over QE2. Then a Harrier jet dipped its nose in tribute.
The vessel passed its terminal for the last time at about 2000 GMT, where more fireworks were let off.
QE2 was then visible from shore as it headed out into the Solent until about 2115 GMT.
The vessel was earlier cleared to sail by inspectors after running aground on a sandbank in the early hours.
Five tugs were sent to assist the 70,000-tonne liner at the entrance to Southampton Water.
It is thought gale force winds may have contributed to the incident.
About 1,700 passengers and 1,000 crew were on board. Many said they had felt the ship "shudder".
The ship was pulled off the sandbank after about 30 minutes, Solent Coastguard said. It later docked at 0730 GMT.
"The boat rocked. We thought it had hit something," said Gloria Dunkley, of Poole, Dorset, who was travelling with her husband.
"We were not too alarmed as no bells were rung."
Divers inspected whether the vessel was damaged when it hit the sandbank and the Maritime and Coastguard Agency sent two surveyors on board. The ship was later cleared to leave, Cunard said.
At 1100 GMT, one million poppies were dropped over the vessel by a DeHavilland Beaver aircraft accompanied by an Auster, to mark the 90th anniversary of the end of World War I and the start of a two-minute silence.
The Duke of Edinburgh went on board to meet crew members who travelled on the vessel when it was used as a troop ship in the Falklands War in 1982.
He was introduced to former captains of HMS Ardent, Antelope and Coventry - ships that were lost in the Falklands campaign.
He then joined other guests to watch an RAF Harrier jet, from No 1 (F) Squadron, hover over the ship for about one minute at 1345 GMT, before dipping its nose in tribute.
As well-wishers looked on from packed ferries in Southampton Water, RFA Mounts Bay led a flotilla of ships past the liner, blowing its horn as it went.
In a farewell address, Cpt Ian McNaught told the crowd the vessel had been acclaimed all over the world as a symbol of British excellence.
"For 40 years QE2 has striven to serve Southampton and serve her country with flair and fortitude," he said.
"But now her sea days are done and she passes on to a new life in a new home. We wish her well.
"On behalf of QE2 I bid Southampton farewell and thank you for all the affection you have shown to her in all these years.
"Southampton I salute you."
It was the Duke of Edinburgh seventh visit to the vessel, which was launched by the Queen at Clydebank, near Glasgow, in September 1967.
The liner has sailed nearly six million nautical miles, been round the world 25 times, crossed the Atlantic more than 800 times and carried more than 2.5 million passengers.