Media playback is unsupported on your device Media caption Duchess names new aircraft carrier HMS Prince of Wales

The second of the UK's new generation of aircraft carriers, HMS Prince of Wales, has been officially named in a ceremony at Rosyth Naval Dockyard.

Prince Charles, who shares a title with the £3bn vessel, watched as his wife Camilla, the Duchess of Rothesay, carried out the duty.

The 900ft-long (280m) warship is externally complete but it will take 18 months to fit its internal systems.

It will be 2019 before the ship can begin sea trials.

Image copyright Crown copyright 2017 Image caption The aircraft carrier was named by Camilla, the Duchess of Rothesay

Image caption Prince Charles watched as his wife conducted the naming

Its identical sister ship, HMS Queen Elizabeth, arrived in its home base of Portsmouth last month.

The carrier cannot currently deploy planes but flying trials are due to begin next year.

The two new aircraft carriers are bigger than anything ever built for the Royal Navy.

Once afloat they will displace 65,000 tonnes.

Image caption A bottle of whisky was smashed on the side of the ship's hull in the traditional naming ceremony

Naming the new warship, the Duchess of Rothesay said the ships represented a "new era in our long military history".

The duchess said the ship shared a title with her husband.

"So I have a particular affection for it," she said.

The naming was completed by triggering a bottle of 10-year-old whisky from the Laphroaig distillery in the Isle of Islay, smashing it against the ship's hull.

HMS Prince Of Wales

Cost: £3bn

Flight deck length 280m (900ft)

Weight: 65,000 tonnes

Range: 10,000 nautical miles

Crew: 700

Capability: Able to carry 36 F35B jets and four helicopters

Image caption Crew line up on the deck of the carrier before the ceremony

Martin Douglass, engineer and director of the Aircraft Carrier Alliance which built the ships, said the Queen Elizabeth had arrived in Portsmouth three weeks ago.

He said: "It is in a maintenance period to bring her up to full spec to hand her over to the Royal Navy later in the year."

Mr Douglass said HMS Prince of Wales was about two years behind the other aircraft carrier.

He said: "It has just finished the structural completeness externally and now we are into the outfitting phase."

The engineer said it would take about 18 months to ensure the ship's systems were connected correctly.

Image copyright Crown copyright 2017 Image caption There was a flypast before the naming ceremony

HMS Prince of Wales, like its sister ship, was built at six different yards around the UK before being assembled at Rosyth in Fife.

About 10,000 people and 800 different companies have been involved.

HMS Prince of Wales' future had been in question after the 2010 defence review said it could be sold off or mothballed because of budget cuts.

Image copyright Crown Copyright 2017

However, in 2014 the government announced that it would be brought into service with the Navy.

During the course of the project, an order for jets capable of short take-offs and vertical landings was switched to jets with a longer range that could carry more weapons.

However, the MoD decided to revert to the original F35B jets for logistical and financial reasons.

Ian Groom, the captain of HMS Prince of Wales, said the second aircraft carrier would allow the UK to always have a carrier available.

He said: "These ships are designed specifically to deliver carrier strike, the F35 jets, but they have a hugely flexible range of other activities right the way from delivering humanitarian aid to delivering hard military power."

Captain Groom insisted that there was still a need for aircraft carriers despite security concerns focusing on terrorism.

He said: "These ships can be placed anywhere in the world, they can travel 500 miles a day.

"We can put a mixture of assets whether it is the full 36 jets and four helicopters or a range of other assets but what they really provide is that political choice, to act independently or with our partner nations. They have got huge value even in today's age."

At the moment, the ship has about 200 crew in Rosyth. This will be raised to 700 as it nears sea trials.

It will be ready for front-line duties around the world from 2023.