Oldham manager John Sheridan was keen to keep the 26-year-old, who scored the winner in the League One side's FA Cup triumph over Everton.
The Irvine-born midfielder has made over 90 appearances for Oldham, scoring 12 goals.
In 2005 he scored for Scotland's Future team in their 2-0 win over Poland.