THE QE2, which had run aground hours earlier, tonight sailed serenely out of Southampton on a tide of emotion on its last-ever voyage.

With hundreds of passengers waving from the decks and thousands of spectators watching from the shores of Southampton Water, the 70,000-tonne Cunard liner headed off into maritime history.

Fireworks flashing from the shore, the Dubai-bound ship paused so that its master Captain Ian McNaught could tell the crowd, in a message shown in Mayflower Park, how QE2 has been "a symbol of British excellence for 40 years".

Fireworks farewell from Southampton Water

It was all so different from the vessel's inglorious entry into Southampton early today when, as strong westerly winds blew, the liner had run aground on a sandbank near the Isle of Wight.

Passengers had spoken of feeling a shudder as the vessel - packed with 2,700 customers and crew - came to a halt.

Fireworks farewell from Mayflower Park

A combination of five tugs and a favourable tide helped refloat the vessel, which arrived at its Southampton mooring more than an hour late.

Later, as the Duke of Edinburgh toured the ship meeting present and past crew members, two divers went down to check the state of the vessel.

Cunard bosses said later that there had been no damage to the hull and that the 7.15pm final departure could go ahead.

The ship moved off from its berth and was halted alongside Mayflower Park before finally sailing away from Southampton on a 16-day voyage to Dubai.

Last year Cunard announced that it was selling the QE2 to the Dubai World company for around £50m, with the vessel becoming a floating hotel and tourist attraction.

Today in his farewell message, Captain McNaught said: "For almost 40 years, QE2 has been acclaimed all over the globe as a symbol of British excellence."

He added that the vessel had returned to Southampton 726 times in its long career, having been launched by the Queen in 1967, and having come into service in 1969.

But this time the ship would not be coming back, he said, adding: "QE2 has striven to serve Southampton and serve her country with flair and fortitude.

"But now her sea days are done and she passes on to a new life in a new home. We wish her well."

Earlier Prince Phillip had joined crew members in observing the Armistice Day two-minute silence, during which a Tiger Moth aircraft had dropped one million poppies on the QE2.

The Harrier bows to the QE2

The vessel had been requisitioned and used as a troop ship in the Falklands War in 1982 and the Duke met crew members who had sailed to the South Atlantic on the ship as well as the former captains of HMS Ardent, Antelope and Coventry - ships that were lost in the Falklands campaign.

After meeting past masters of the QE2 and then having lunch, Prince Phillip watched a fly-past of the vessel by a Harrier Jet and also saw sail-pasts by Royal Navy vessels.

Presenting to the Mayor of Southampton a painting of the QE2 which was unveiled by the Queen when she made her farewell visit to the liner in June this year, Prince Phillip joked that the QE2 interfered with his sailing off Cowes in the Isle of Wight.

He also bemoaned the fact that he never had the opportunity to travel on the vessel on a transatlantic voyage, adding that at least he was getting a meal today.

The QE2 will reach Dubai on November 26 and will then be handed over to the Nakheel Company, which is part of Dubai World, and the creators of the Palm Jumeirah, the largest man-made island in the world.

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 new-look vessel will have a heritage museum displaying artefacts from the ship and from maritime history.

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.