An opportunist goal on 34 minutes from Juan Sara gave Dundee a 1-0 half-time lead over Kilmarnock at Dens Park.
The Argentinian was on hand to capitalise on a Kevin McGowne miskick to slam the ball in from close range.
Kilmarnock were looking for the three points to strengthen their bid for a European place while Dundee were looking to make amends for their poor home form this season which has seen them chalk up only one victory since November.
And it was the home side who started the better with their first attempt on goal coming as early as the fourth minute.
Defender Alessandro Romano picked up a loose ball on the edge of the box and let fly on the half-volley but his poor effort trundled harmlessly through to the Kilmarnock keeper Colin Meldrum.
Dundee took confidence from this and forced a couple of corners in quick succession before Kilmarnock defender Gus MacPherson eventually cleared the danger.
The home side remained on top and in the eighth minute a surprise volley from Javier Artero from the right hand side of the box nearly caught Meldrum out.
The visitors' only response was a series of long punts up the park which the Dundee defence coped with comfortably.
The home side continued to enjoy the bulk of possession but often over elaborated in their attempts to bring down the Kilmarnock defence.
The visitors were rarely in attack and their first effort at goal came midway through the first half when Ali Mitchell drove towards the home goal before unleashing a drive from 20 yards.
However, Dundee keeper Jamie Langfield watched unconcerned as the ball went wide off his right-hand post.
Moments later Dundee defender Chris Coyne foolishly gave possession away in a dangerous area, just outside his own box, and was lucky enough to be punished as the visitors hesitated and failed to take advantage.
In the 27th minute Kilmarnock midfielder Chris Innes was fortunate to escape a yellow card after a foul on Beto Carranza as the winger bore in from the left.
From the resulting free-kick the ball was rolled out to Dundee midfielder Giorgi Nemsadze who blasted the ball high over the bar from 25 yards.
Dundee were looking more imaginative and there was no surprise when they took the lead in the 34th minute.
Nemsadze sent Artero down the right and when the midfielder's cross came over, Kilmarnock centre-half McGowne made a hash of his clearance in the six-yard box.
The ball fell kindly for Dundee striker Sara who had the simplest of tasks to slot the past Meldrum.
Minutes later the home side nearly made it two when Fabian Caballero neatly laid the ball off for Sara inside the box but this time the Argentinian blasted high over the bar.
Sara missed an incredible opportunity after a Nemsadze cross was headed back across goal by Artero at thre end of the half.
With an open goal at his mercy Sara contrived to head past the post to the astonishment of the home crowd.