The Queen arrived at Plymouth Railway Station in Devon by royal train and travelled by car to HMNB Devonport, where there was a 21 gun salute.
Captain Robert Pedre, the commanding officer of HMS Ocean, presented Admiral Sir Philip Jones, First Sea Lord, and Commodore Ian Shipperly, the Naval Base Commander, to the Queen.
Following the ceremony the Queen - the ship's Lady Sponsor - said a few words.
The Queen went onboard the ship for lunch, before she met with families and ship personnel and left by car.
There was a 21 gun salute as the Queen leaves Devonport.
We pay for your stories! Do you have a story for The Sun Online news team? Email us at [email protected] or call 0207 782 4368 . You can WhatsApp us on 07810 791 502. We pay for videos too. Click here to upload yours.