Kilmarnock returned to the top of the Scottish Premiership as second-bottom Dundee lost for the first time in five matches.
Kirk Broadfoot’s scrappy second-half opener followed by Genseric Kusunga’s own goal put the home side in command at Rugby Park.
And Chris Burke capitalised on Andy Boyle’s mistake to set up Greg Stewart for the third.
Kenny Miller pulled one back for the visitors near the end.
That goal kept Jim McIntyre’s side ahead of St Mirren on goal difference and they play their game in hand against Aberdeen on Tuesday.
Steve Clarke’s Killie, who visit Hamilton next Saturday, will be knocked off top spot if at least one of Celtic or Rangers win on Sunday.
Clarke said before kick-off he wanted to see a reaction from his players following last week’s 5-1 defeat at Celtic Park and the Ayrshire side created the vast majority of the chances.
Eamonn Brophy claimed unsuccessfully for a penalty after being crowded out just inside the box and later went close with two free-kicks while Stewart fired over and drew saves from Jack Hamilton.
But Killie did not completely boss the game with Miller contriving to fire wide of the hosts’ goal at a free-kick and Jesse Curran and Boyle denied by home goalkeeper Daniel Bachmann in quick succession.
Stephen O’Donnell came very close to scoring an own goal, diverting the ball wide after Curran had just failed to connect with a Miller cross.
When the breakthrough came, it was unspectacular but welcome for Kilmarnock. A corner from the right made it all the way to the back post and Broadfoot forced the ball over the line.
Kusunga then converted Brophy’s teasing cross before Boyle gifted Burke possession in the build-up to Stewart’s simple finish.
Miller ruthlessly fired home after Broadfoot could not cut out a cross in added time – a seventh goal in five games for the Dundee striker.