A piper plays as HMS Invincible sails into port for the last time
In pictures
The event in Portsmouth marked HMS Invincible's 25 years of service, which includes the Falklands war in 1982.
The aircraft carrier will be de-commissioned and sold in 2010.
Critics are worried that Invincible's retirement has left the navy with only one aircraft carrier, HMS Illustrious, while HMS Ark Royal undergoes a refit.
Mothballed
Captain Neil Morisetti, Invincible's commanding officer, said the event was an opportunity to "celebrate not only her 25 years of service but also the hard work and dedication shown by members of the ship's company past and present".
The Ministry of Defence (MoD) said Invincible would be gradually relieved of its crew and captain soon after the decommissioning ceremony.
The crew will be given new postings and the vessel will be handed over to the MoD's Disposal and Reserve Ships Organisation where it will be mothballed until it is sold.
The carrier was launched by the Queen in 1977. The Duke of York was based on board as a Sea King helicopter pilot during the Falklands war.
The decommissioning ceremony for the former British Royal Navy flagship HMS Invincible has taken place in Portsmouth, Hampshire today.

The ceremony marks the end of the aircraft carrier's 25-year career. Invincible was commissioned into the Royal Navy on 11 July 1980 and first saw service in the Falklands War in 1982. The Duke of York served aboard Invincible as a helicopter pilot.

Pipers played aboard Invincible while it sailed into Portsmouth Naval Base on 1 August for the last time. A gun salute and a flypast also marked the event.

Last month, Invincible undertook a UK tour to celebrate the ship's silver jubilee. In June, the carrier acted as flagship for the International Fleet Review to mark the 200th anniversary of the Battle of Trafalgar.

The Ministry of Defence (MoD) said that Invincible would be 'mothballed' for five-years in a state of reduced readiness. 

It is unlikely that Invincible will ever be recommissioned into the Royal Navy.

The MoD said that a decision to either sell, scrap or even turn Invincible into a museum ship will be made in 2010.

The decommissioning took place six-months earlier than planned and has prompted fears that the Royal Navy will be left overstretched. The move has been criticised by the opposition Conservative Party, who say that it will reduce the Royal Navy's capability at a time of "unprecedented international tension". 

Ark Royal is about to undergo a major refit at Rosyth, which leaves Illustrious — the Royal Navy's new Fleet Flagship — as the only aircraft carrier on active service. 

The three aircraft carriers are expected to be replaced by 2015 with two 65,000 tonne aircraft carriers — believed to be named HMS Queen Elizabeth and HMS Prince of Wales.