The largest warship ever built in the UK heralds a "new dawn" for the delivery of the nation's security, the First Sea Lord has said as it was formally named by the Queen.

The 65,000-tonne Royal Navy aircraft carrier HMS Queen Elizabeth was christened during an event at the Rosyth Dockyard in Fife, where the ship was assembled and fitted out.

Prime Minister David Cameron, First Minister Alex Salmond, Labour leader Ed Miliband and First Sea Lord Admiral Sir George Zambellas were among those who attended the ceremony.

The Queen, who was accompanied by the Duke of Edinburgh, oversaw the traditional naming ceremony by pressing a button to release a bottle of Islay malt whisky - suspended at the front of the ship - to smash on to the hull.

About 3,500 people involved in the design and construction of the carrier watched the celebrations, alongside dignitaries and politicians.

Those attending also included Defence Secretary Philip Hammond, Chancellor George Osborne, Chief Secretary to the Treasury Danny Alexander and Scottish Secretary Alistair Carmichael, as well as former prime minister and Kirkcaldy and Cowdenbeath Labour MP Gordon Brown.

The RAF's Red Arrows performed a fly-past during the event, painting the sky over the Forth red, white and blue.

The fly-past was followed by a procession of three generations of Royal Navy aircraft, including a historic 1950s de Havilland Sea Vixen fighter - the last and only flying aircraft of its kind in the world.

Admiral Sir George Zambellas said: "The naming of HMS Queen Elizabeth heralds a new dawn, not only for the Royal Navy but for the delivery of our nation's security. Her journey ahead will be global, strategic and one of inter-service and international partnership."

In her speech, the Queen said: "In sponsoring this new aircraft carrier I believe that Queen Elizabeth, as flagship for the Royal Navy, will be a source of inspiration and pride for us all.

"The Lord High Admiral, the Duke of Edinburgh, joins me in congratulating all those involved in the Aircraft Carrier Alliance on this magnificent achievement, and wishing her first ship's company well in the time ahead.

"Wherever this ship may serve, whatever tasks may be asked of her, let all those who serve on her know that on this day she was blessed with the prayers of us all for her success and for her safe return to calm waters.

"I name this ship Queen Elizabeth, may god bless her and all who sail in her."

It comes five years after the first metal was cut on the vessel and 33 months after the first section entered the dry dock at Rosyth for construction to begin.

The ship and a second vessel, the under-construction HMS Prince of Wales, are the largest warships ever built for the Royal Navy.

The two ships are known as Queen Elizabeth Class aircraft carriers and are being built by the Aircraft Carrier Alliance (ACA), a partnership of BAE Systems, Babcock, Thales and the Ministry of Defence.

The naming ceremony, a naval tradition dating back thousands of years, marked the first time in more than 15 years that the Queen has christened a Royal Navy warship.

Overall, six shipyards around the UK - Appledore, Birkenhead, Govan, Portsmouth, Rosyth and Tyne - have been involved in building various parts of the carriers.

Celebrations were held at 15 sites across the UK to mark the christening today, with the events in Rosyth relayed live on giant screens, and landmarks including Edinburgh Castle were lit up in royal blue.

Those behind the project, which costs an estimated £6.2 billion overall, say the QE Class will be the centrepiece of Britain's naval capability.

Each of the carriers will provide the armed forces with a four-acre military operating base, which can be deployed worldwide, operating the F-35 Lightning II and a number of types of helicopter.

Mr Salmond it was a "huge miscalculation" to think that events such as the carrier launch would boost the No vote.

He said: "I think it's been said the Prime Minister was hoping and planning that armed forces day in Stirling, the launch of the carrier, would have that effect.

"That's a huge miscalculation.

"People can be proud of the armed forces, proud of the launch of an aircraft carrier, proud to build a ship, that doesn't dictate their politics."

The warships are said to be versatile enough to be used across the full spectrum of military activity, from war fighting to providing humanitarian aid and disaster relief.

The length of each ship, which have a life expectancy of around 50 years, is the equivalent of 28 London buses - almost three times the length of Buckingham Palace.

The naming ceremony marked the structural completion of HMS Queen Elizabeth, which will be floated out of her dock for the first time later this month.

The carrier will have 679 permanent crew and capacity for 1,600 crew members when fully operational.

There has only been one previous HMS Queen Elizabeth, which was completed 100 years earlier.

Writing in the naming book for the carrier, the Prime Minister said: "The United Kingdom is a truly great country whose proud maritime heritage has helped secure its place on the international stage.

"We live in a world which is increasingly inter-connected and inter-reliant. But one thing remains unchanged. The world's sea lanes are our trading superhighways, with over 95% of our nation's trade by volume still transported across the high seas.

"HMS Queen Elizabeth is the flagship of our nation's maritime ambition and will be the spearhead of British sea power for the next half century. She is also a tribute to the skills and craftsmanship of the workforce at Rosyth, on the Clyde, in Portsmouth and in yards and factories throughout the United Kingdom.

"As a national instrument of power and influence, HMS Queen Elizabeth is not just an investment in the future of the Royal Navy and our defence. She is an investment in the future of British security, British prosperity and our country's place in the world."

Defence Secretary Philip Hammond said: "HMS Queen Elizabeth is the largest ship that the Royal Navy has ever had and is a true demonstration of the UK at its best, with over 10,000 people across the country working together to deliver her.

"This occasion marks a major milestone in regenerating the UK's aircraft carrier capability, enhancing our ability to project power anywhere in the world."

After today's naming ceremony, the dock will be flooded to enable the carrier to float for the first time. Work to prepare the ship for sea trials in 2017 and flight trials with Lightning II aircraft in 2018 will continue, officials said.