Dunfermline revived faint promotion hopes and gained Scottish Cup revenge with a win at Hamilton.
The third-placed team had the better of the opening exchanges with Christopher Kane and Stephen Jordan both going close in the opening 15 minutes.
The home side hit back when Alistair Crawford forced a good save from Dunfermline goalkeeper Paul Gallacher from the edge of the penalty area a minute later.
But Dunfermline took a deserved lead in the 37th minute when the excellent Andy Kirk finished neatly into the top corner from 12 yards following a Ryan Wallace pass.
Dunfermline extended their lead in the 64th minute when Joseph Cardle pulled the ball back from the bye-line for Kane to convert from six yards.
However, Hamilton hit back just two minutes later when Grant Gillespie volleyed home from the edge of the six-yard box after a Louis Longbridge cross.
Hamilton went close to an equaliser after 75 minutes when Andrew Ryan's 25-yard effort was brilliantly blocked by Gallacher and Dunfermline held on for the win.
Hamilton: Cuthbert, Gordon, Canning, Page, Hendrie (Devlin 84), Routledge, Longridge, Gillespie, Mackinnon (Ryan 63), Crawford (Fisher 64),May. Subs Not Used: Christie, Fraser.
Booked: Page. Goals: Gillespie 66.
Dunfermline: Gallacher, McMillan, Dowie, Morris, Jordan (Millen 26), Falkingham, Kane, Byrne, Cardle (Whittle 90), Kirk, Wallace (Thomson 82). Subs Not Used: Hrivnak, Dargo.
Booked: Kane. Goals: Kirk 37, Kane 64.
Ref: Bobby Madden