Following the beginning of the 2004–05 season, Main joined Scottish Third Division side Gretna on a three-year deal and went on to feature in each of their consecutive championship wins, culminating in promotion to the Scottish Premier League. Main guested for Shamrock Rovers in a friendly against Hibernian in July 2005. On 6 March 2007, two months before Gretna's promotion to the top flight, it was announced that Main had signed a pre-contract agreement with his former club St Johnstone on a two-year deal.