The "best ever" Commonwealth Games has closed in spectacular style as Glasgow passed the baton on to 2018 host, the Gold Coast.
A glittering closing ceremony at Hampden Park brought an end to the 11-day competition which thrust Scotland's biggest city into the world spotlight.
Australian pop princess Kylie Minogue got the 40,000-strong crowd into full party mode with a blistering seven-song set.
And Prince Imran of Malaysia, president of the Commonwealth Games Federation (CGF) declared: "Glasgow - you were Pure, Dead Brilliant."
Dubbed the Friendly Games, Glasgow 2014 was seven years in the planning and ended with it being widely hailed a great success.
The competition, featuring 17 different sports, saw more than 140 Commonwealth and several world records broken.
England topped the medal table, followed by Australia, Canada and host nation Scotland, which finished with its best Commonwealth Games medal tally of 53.
But in many people's eyes, the big winner was Glasgow, which was praised for its "gallus and glittering" hosting and is expected to enjoy a tourism boost in the wake of the Games.
And the city gave the Games a truly Scottish goodbye as the flag of the CGF was sent on its way to Queensland, Australia.
Fireworks got proceedings under way with a bang before Glasgow-born singer Lulu sent decibel levels through the roof with her famous hit Shout.
Organisers transformed the arena from the setting for Glasgow 2014's track and field events into the city's very own ''Commonwealth festival''.
In keeping with the festival theme, the athletes who took part in the Games emerged from almost 700 tents dotted throughout the stadium to a thunderous Hampden roar.
Host Des Clarke described the ceremony as the ''biggest party in Scotland's history''.
The live music kept on coming, with Glasgow legends Deacon Blue, who formed in the city in 1985, paying tribute to the city's workers with a rendition of their anthem, Dignity.
Local synth-pop trio Prides introduced the Games volunteers - known as Clyde-siders - and performed their song Messiah.
Music of a different kind came from the pipes and drums of the Royal Edinburgh Military Tattoo, Scottish folk singer Karen Matheson, Dougie Maclean and a mass performance of Auld Lang Syne.
But - in recognition of the Games' journey Down Under in four years' time - it was Minogue who took the proverbial roof off with a storming rendition of some of her best-loved hits, including Spinning Around, The Locomotion and Can't Get You Out Of My Head.
Addressing the crowd, Prince Imran praised the athletes' "inspiring performances".
"The Games have made us all very proud and truly brought our family together," he said.
"Scotland, and Glasgow, you really have delivered in every aspect the best Games ever.
"I hope you enjoy the closing ceremony and as we say farewell until we all meet once more on the Gold Coast, Australia, in 2018.
"Glasgow - you were Pure, Dead Brilliant."
Glasgow handed the CGF flag back to the federation, who entrusted it into the care of the Gold Coast to keep it safe until 2018.
Tom Tate, mayor of city of Gold Coast, said he was "honoured" to receive the flag.
Queensland tourism minister Jann Stuckey said Glasgow had ''set the bar very high''.
The closing ceremony impressed the crowds gathered at Hampden.
Susan Taylor, 34, visiting from London, said the highlight was Minogue's performance. "It was a brilliant end to the games, and amazing to see Kylie do so many songs," she said.
Mary Ross, 45, from Glasgow, said the event had rounded off a spectacular fortnight in the city. "I enjoyed seeing the athletes coming out of the tents to Lulu," she said. "And of course Kylie was the highlight of the night."
Earlier in the day, the final stretch of the competition saw the home nations grab their last chance for Commonwealth glory.
England's road cyclists triumphed in the torrential rain conditions, with team mates Lizzie Armitstead and Emma Pooley taking gold and silver. In the men's event there was gold for Wales' Geraint Thomas and silver for England's Scott Thwaites.
In badminton Scotland's Kirsty Gilmour took home a silver in the women's singles and there were further gold and silver medals for England in the mixed doubles gold medal match. Success on the squash courts saw Team England win a further two silvers and a bronze medal.
Scotland's First Minister Alex Salmond said the Games could be summed up as ''gallus and glittering''.
He said: "The overwhelming impression of Glasgow and Scotland's Games is of a job extremely well done. We hope we have taken the baton on for the Commonwealth and present it to the Gold Coast in fine order."
Prime Minister David Cameron said: "We say thank you to the people of Glasgow, the organising committee, the city council, the troops the police, the athletes.
''It has been dazzling, it has been wonderful, it has been a joy to behold and you have made the whole country proud."
Louise Martin, chairwoman of sportscotland, said the nation had proved itself on the sporting stage as athletes and as competition hosts.
She said: ''Quite simply, Glasgow 2014 has been a Commonwealth Games to remember."