The Queen has officially welcomed the UK's new aircraft carrier, HMS Queen Elizabeth, at a ceremony to commission it into the Royal Navy fleet.
The monarch boarded her namesake ship in Portsmouth to see the Royal Navy White Ensign raised on the vessel for the first time.
Princess Anne, Defence Secretary Gavin Williamson and First Sea Lord Admiral Sir Philip Jones also attended.
The ceremony took place on the giant hangar deck of the £3.1bn carrier.
HMS Queen Elizabeth and its sister ship HMS Prince of Wales are the most expensive in the Royal Navy's history.
The navy initially estimated both ships would cost £3.5bn to build but the total figure was revised to £6.2bn.
About 3,700 guests attended the event, which came more than three years after the vessel's official naming ceremony in Rosyth when the Queen broke a bottle of whisky on its hull.
During the ceremony, the commissioning warrant was read, and the Blue Ensign, which has been flying from the ship until it is formally handed over to the Royal Navy, was replaced with the White Ensign, raised by 20-year-old Able Seaman Ellie Smith from Hull.
Addressing the assembled guests and ship's company, The Queen described the ship as "the most powerful and capable ship ever to raise the White Ensign".
"At the forefront of these responsibilities will be the men and women of the Royal Navy, the Royal Marines, supported by the Army, Royal Air Force and by coalition partners.
"As the daughter, wife and mother of naval officers, I recognise the unique demands our nation asks of you and I will always value my special link to HMS Queen Elizabeth, her ship's company and their families," she said.
Admiral Sir Philip Jones, said: "We have been on a long, complicated - but committed - journey to get to this point and commissioning the ship is a key milestone.
"The point of the big grey ship is it's enormously big, flexible, capable and adaptable."
As part of the ceremony, a 8ft-long (2.44m) cake replica of the ship was cut. As is traditional, it was carried out by the youngest member of the ship's company - Callum Hui, 17 - and the captain's wife Dr Karen Kyd.
'A potent symbol?'
By Jonathan Beale, Defence Correspondent
This is a big day for the Royal Navy. A chance to look to the future and, at least for a moment, forget about recent defence cuts and fears of even more.
After successfully completing her sea trials HMS Queen Elizabeth will be commissioned into service. For the first time she'll raise the White Ensign - officially becoming a Royal Navy Warship. But, this is still another milestone not the end of her journey.
Flight trials will begin next year and her first proper deployment with jets on board isn't planned until 2021. It's also still not clear how many of the new F35 jets she'll carry.
Certainly fewer than the 36 she was built for, with each jet costing around £100m. The Royal Navy believes the carrier - the first of two - will be a potent symbol of British military power. But it's already struggling with limited resources.
Capt Jerry Kyd called the ceremony the "culmination of a number of years of real excitement".
He said: "The first sailing from Rosyth was only nine months ago, we have come a long way.
"The first entry into Portsmouth was in the summer and here we are today accepting the ship into Her Majesty's fleet formally.
"So, it is right at the top, it is the latest milestone, many more to come, but hugely exciting and a very proud day."
The 900ft-long (280m) carrier cannot currently deploy planes but F-35B Lightning fighter jets are due to make their first trial flights from the carrier's deck next year, with 120 air crew currently training in the US.
Preparations for the arrival of the flagship of the fleet and its 700-strong company led to more than 20,000 items, ranging from a human skull to sea mines, dredged up from Portsmouth Harbour.
The Ministry of Defence said specialist dredging vessels had removed 3.2 million cubic metres of sediment - equivalent to 1,280 Olympic swimming pools - during the dredging operation carried out to deepen the harbour mouth to enable the Queen Elizabeth to reach Portsmouth naval base.