Azerbaijan brought the 2017 Islamic Solidarity Games to an end with a sparkling closing ceremony at Baku's Olympic Stadium on Monday night, as the host nation celebrated finishing top of the medals table.
After 12 days of competition involving 54 Islamic Solidarity Sports Federation countries from four continents, Azerbaijan finished with 75 gold medals, four more than the Games' next hosts Turkey.
Although many of the 2,800 athletes that competed had already left the city, Baku and its 1,500 volunteer performers put on a vibrant show to officially wave goodbye.
The fourth edition of the multisport event represented the next step on the possible path to staging the Olympics for Azerbaijan, after two previous failed bids.
The 'city of winds' also hosted the inaugural European Games two years ago, and have their second Formula One Grand Prix to look forward to next month.
"Building on the legacy of the Baku 2015 European Games, we have welcomed old friends and new from across the Islamic world to our state-of-the-art sporting facilities, and our young people have applied their ever-growing skills to deliver yet another world-class event," said Minister of Sport Azad Rahimov.
"The work of the Baku 2017 Operations Committee may be coming to an end, but our capital city's journey as a world centre for international sport and culture goes on.
"Sport will continue to play a central role in our national development in the years to come."
The closing ceremony itself began by depicting a young woman in Baku's old town blowing gold dust that is carried around the capital by the Gilavar breeze, to show its most iconic sights.
The parade of the remaining athletes followed, with a massive cheer from the tens of thousands of fans greeting their victorious team, who were led by judo gold medallist Eklhan Mammadov.
A 25-metre high 'tree of life' provided the focal point for the ceremony, and was 'watered' before the show passed through several segments celebrating Azerbaijani culture and the 'spirit of solidarity'.
After a celebration of the 12,000 volunteers that helped make the Games a reality, the baton was passed over to Azerbaijan's traditional good friends Turkey, with Istanbul set to hold the fifth Solidarity Games in 2021.
A concert featuring six famous local musicians concluded the ceremony, before a firework display of 15,000 pyrotechnics above the stadium sent the spectators home in fine fashion.
- Sporting success completes perfect Games for hosts -
Rahimov had said before the opening ceremony 12 days ago that the host country were aiming to top the overall medals table, and they did just that after overhauling Turkey, as Iran finished third on 39 golds thanks to a late spate of success.
The most successful home athletes were shooter Ruslan Lunev (five golds), swimmer Maksym Shemberev (four golds) and rhythmic gymnast Marina Durunda (three golds).
Other Azeri favourites also tasted victory, including wrestler Mariya Stadnik, taekwondo practitioner Radik Isayev and five-time karate world champion Rafael Aghayev, who carried the flag at the opening ceremony.
Stars from many countries played their parts in an exciting Games though, as the likes of Benin, Guinea-Bissau and Cameroon all claimed their maiden gold medals.
Aside from the medals, Azerbaijan will be delighted to have given the Solidarity Games a much-needed boost after problems in the last two editions.
Iran cancelled the 2010 event after an argument with Arabic countries over the use of the term 'Persian Gulf', before Indonesia had to change the 2013 host city twice amid corruption scandals and the use of unpaid labourers.
But the 2017 Games passed without a hitch, as Azerbaijan completed its efforts with unsurprising grandeur.
© AFP Services