He first represented Scotland in 2004 and amassed a total of 84 senior caps. Combined with his club appearances, Gordon played 766 first-team games, including 13 on loan at Cowdenbeath in season 2001-02.
His last appearance came in Scotland’s pre-World Cup win over Curacao in May, his final Hearts game coming in a 2-2 draw with former club Celtic in January.
The Scotland national team social media account, external said: “A career unlike any other.”
“Everyone has dreams,” Gordon added. “Mine were probably no different to most kids – play for my club and my country. Heart of Midlothian and Scotland.
“Improbable? Perhaps. Impossible? Absolutely not.
“Hard work, sacrifices, setbacks. Step by step, dreams become reality. From supporting Hearts to playing for Hearts. Years of hard work can never fully prepare you. You want to do yourself proud, you want to do your family proud, you want to do the fans proud.
“I’m not much of a singer, but I improved a little after 84 renditions of the national anthem. The biggest names, at the biggest stadiums, on the biggest stages – I’ve savoured every moment of it.”

