Prince William was the surprise guest of honour at a wrap party for around 1,500 people who helped make the Games happen.
He took to the stage at the event in Glasgow's Merchant Square to tell the guests it was a "huge honour" to join them to celebrate a "job well done".
Referring to his visit to the Games with the Countess of Strathearn and Prince Harry, he said: "When Katherine, Harry and I visited last week we saw the slogan People Make Glasgow. It was written all over the city.
"You epitomise that slogan in the way that you ran the Games - with professionalism and great care, allowing the Games' friendliness to shine through.
"These were undoubtedly the best ever Commonwealth Games in history and you guys made it that way. You have helped to deliver a triumph."
He thanked Games staff on behalf of the Queen, adding: "It meant an awful lot to the Queen that the Commonwealth Games, which are so dear to her, were in safe hands.
"Thank you for your dedication, your professionalism and most importantly for all you've done for the Commonwealth Games.
"I know that the people of Glasgow and the country thank you also."
William took time to chat with hundreds of people at the event, including Tim Love, venue manager at Ibrox during the Games.
Mr Love said: "Prince William asked what the secret to the success of the Games was, and to be honest I said it was more to do with the spectators.
"They were definitely there to really enjoy themselves and to get behind everyone. It was great to see everyone getting support no matter where they were from."
Speaking about his time at the Games, he said: "It was fantastic, a great, great atmosphere.
"We've all had a great experience and it is an experience that will live with us forever. It will be one of the highlights of anyone's life, I'm sure."
Irene Anderson, PA to the Games' chief financial officer, said: "It was such a lovely surprise. None of the rest of the team knew he (William) was coming and when he came up the stairs one of them turned to me and said 'This is such a special thing'.
"I just means a lot to people that someone like Prince William made the effort to come all the way to Glasgow just to say thanks."
William also joined the crowd in singing Happy Birthday to Games chairman Lord Smith, who turns 70 tomorrow, as a cake was cut on the stage.
David Grevemberg, chief executive of Glasgow 2014, told those gathered they had "created history".
He said: "We set out to be trustworthy, we were trusted. We set out to raise the bar, we certainly raised it - I think we raised the roof. We set out to win together, we did it all along the way.
"We delivered. We delivered to plan and we delivered beyond our expectations."