Image caption World leaders enjoying a spectacular flypast by the Red Arrows over the Celtic Manor Resort on Friday

As the Nato Wales Summit nears its end, Prime Minister David Cameron said Wales had "done the UK and Nato proud".

Conference talks concluded on Friday afternoon and world leaders will soon make their way from Newport.

Mr Cameron said the alliance would leave the Celtic Manor "a stronger Nato, better able to keep our people safe."

President Obama said it was a "great honour" to be the first sitting US president to visit Wales.

He has now departed the summit in his Marine One helicopter, heading for a Gloucestershire RAF air base before flying back to the US.

Media playback is unsupported on your device Media caption World leaders gather for a group photo at the end of the two-day Nato summit

The event brought together more than 60 national leaders and 4,000 delegates amid tight security.

As the event draws to a close, there have been warnings of road congestion, around the summit and near Cardiff Airport.

Police said the M4 may be affected during rush hour on Friday, but it would not be closed.

Friday's events began with an aerial display by military jets, when thousands of people gathered in Cardiff Bay, Penarth and Newport to watch a fly past by aircraft from nine countries, including the RAF's Red Arrows.

Leaders including President Obama and Prime Minister David Cameron watched from outside the Celtic Manor as the planes passed overhead.

Image copyright AFP Image caption David Cameron said the alliance would leave the summit "united in purpose"

Image copyright Crown Copyright Image caption The Red Arrows went straight over the Celtic Manor resort

Image copyright Crown Copyright Image caption The eyes of the world are on Wales for the summit which is being covered by 1,500 journalists

Image caption The US president during the Nato talks on Friday morning

Image copyright Nato Wales Image caption Signatures on the Nato style Military Covenant agreed at the meeting

Image copyright Crown copyright Image caption A CV22 Osprey lands after demonstrating its capabilities at the summit

Ukraine, Afghanistan, and the future of the Nato alliance were at the top of the agenda for politicians and diplomats throughout the conference.

On Friday Mr Cameron told the summit the UK would pledge 1,000 troops to a new multi-national rapid reaction force.

Nato defence ministers including US Secretary of State John Kerry and UK Defence Secretary Phillip Hammond met their counterparts from France, Australia, Germany, Canada, Turkey, Italy, Poland and Denmark to discuss enhanced opportunities for co-operation.

Closing the event on Friday afternoon, Nato Secretary General, Mr Fogh Rasmussen, said the summit had enhanced the alliance's partnerships and strengthened the bond between North America and Europe.

He thanked Prime Minister David Cameron for hosting the summit adding: "To the people of Wales, thank you for your warm hospitality 'diolch yn fawr'."

Mr Cameron said the member countries would leave the summit "united in purpose, with a strong Nato better able to keep our people safe."

He thanked those who had worked to make the summit possible adding: "Most of all I would like to thank the people of Wales who have welcomed the world, and I believe, done the UK and Nato proud."

Image copyright Reuters Image caption 'Great honour' to visit Wales, says Obama as he closed the Nato Summit

President Obama, who closed the summit, added: "I want to thank the people of Newport and Cardiff and the people of Wales for welcoming me and my delegation so warmly.

"It's a great honour to be the first sitting US president to visit Wales."

Socks, coasters and computers - the gifts given to leaders

World leaders were presented with willow baskets filled with gifts from Wales at the summit.

A note from the Prime Minister said: "I hope you will enjoy each of these gifts and be inspired by them to find out about all that Wales has to offer."

The basket included:

Personalised Nato coasters made from Welsh slate

A commemorative piece from the Royal Mint

Welsh cakes

Cufflinks and bracelets in Welsh gold

Selected poems by Dylan Thomas

Woollen socks

A Raspberry Pi credit-card sized computer, made at Sony's Pencoed site

Image copyright Downing Stree

Earlier on Friday, Deputy Prime Minister Nick Clegg met young people in Newport at a children's summit organised by the University of South Wales, where he took part in a question and answer session.

The Welsh government confirmed it has spent £3m in total on the Nato summit - including money spent on improvements to Cardiff Airport.

Wales has been praised for its hospitality throughout the summit.

During a reception hosted by Prince Charles on Thursday, US President Barack Obama told guests he would encourage people in the United States to visit Wales.

Image caption A children's Nato summit was addressed by deputy Prime Minister Nick Clegg

Image copyright Ieuan Berry Image caption The Red Arrows flew over Cardiff Bay before heading to Newport and the summit

Image caption Crowds gathered at Cardiff Bay to watch the fly past

Police said the two-day summit had passed without major incident, but tight security would remain in place until delegates had left Wales.

Two anti-Nato protests held in Newport and Cardiff on Thursday attracted numbers far fewer than the thousands earlier predicted, and resulted in just four arrests in total.

Workers have already started to remove security fences erected in Cardiff city centre and the barriers are expected to be down by the start of next week.

Nearly 10,000 police officers from 43 forces across England and Wales have been on duty as part of an unprecedented security operation for the UK for the summit.

It was announced that Poland will host the next Nato summit.

Image caption Fences have started to be removed from Cardiff City centre after Thursday night's events

Image copyright Athena Pictures Image caption US President Barack Obama chats with Lithuanian President Dalia Grybauskaite at the family photo

Wales Nato Summit 2014 in numbers