 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.Despite turning 41 in 2008, Alan Main was still the number one keeper for St Johnstone going into 2009.