Steven May's 23rd goal of the season set up Hamilton's 2-0 home win against Raith.
Alister Crawford went close to giving the Accies an 18th-minute lead when his ambitious effort flew past the post.
Alex Neil's men had a second opportunity to make the breakthrough in the 31st minute but Andrew Ryan blasted over the bar after Rovers had failed to clear Crawford's corner.
Jonathon Routledge then saw his curling effort go wide in first half stoppage-time.
The deadlock was eventually broken seven minutes after the break with May burying a right-footed strike from just outside the area.
Ryan then swept home May's stoppage-time cut-back to seal all three points as the hosts extended their unbeaten run to six games.