Jim McAlister scored twice in stoppage time as Championship leaders Dundee moved five points clear thanks to a 2-0 win over Raith Rovers at Stark's Park.
Rovers, in fourth place, had Jason Thomson sent off midway through the second half and John Brown's men took advantage with time running out.
Kane Hemmings grabbed the winner with 17 minutes left as Cowdenbeath claimed a precious 1-0 victory over Alloa at Recreation Park to move nine points ahead of bottom club Morton.