Two late goals gave Hamilton victory at the home of Raith Rovers.
The hosts were awarded an early penalty when Allan Walker was brought down by Jonathan Page.
But Walker's spot-kick was blocked by goalkeeper Kevin Cuthbert.
Things went from bad to worse for Raith when Dougie Hill was sent off for serious foul play shortly before a Laurie Ellis goal put Hamilton ahead.
And Stevie May's 25-yard free-kick doubled the visitors' lead in stoppage time.
Raith: McGurn, Thomson, Ellis, Hill, Malone, Grant Anderson, Stuart Anderson, Walker, Smith (Donaldson 84), Graham, Spence (Clarke 74). Subs Not Used: Laidlaw, Hamill, Callachan.
Sent Off: Hill (83). Booked: Stuart Anderson.
Hamilton: Cuthbert, Gordon, Canning, Page, McGlinchey, Devlin (Mackinnon 75), Crawford, Gillespie (Fisher 59), Routledge, Longridge, May. Subs Not Used: Christie, Hendrie, Ryan.
Goals: Ellis 89 og, May 90
Ref: George Salmond