A deserved victory for St Johnstone pushed them into fourth spot and kept Dundee stuck at the bottom of the Premiership.
The Dens men remain without a league win since opening day, while it was a good afternoon for Saints as they moved above Rangers in the table.
The Perth men grabbed the lead on 62 minutes when their captain Steven Anderson volleyed home at the back post.
They then made it 2-0 on 75 minutes when man-of-the-match Danny Swanson swept home a penalty after Kevin Gomis had fouled Steven MacLean.
The visitors then got a spotkick of their own two minutes from time after Anderson had fouled Yordi Tiejsse.
Sub Rory Loy scored it but there wasn’t enough time left to grab an equaliser despite some pressure on the home goal.
Saints had made one change to the side that lost to Kilmarnock at McDiarmid eight days earlier, with David Wotherspoon promoted from the bench in place of Blair Alston.
The visitors stuck by their 3-5-2 formation and drafted the fit-again Darren O’Dea back into the central defence in place of Kostadin Gadzhalov.
As feared, they were without midfielder Mark O’Hara, who may need hernia surgery, and Nick Ross came in for him.
Saints were first to threaten on three minutes when Anderson outjumped the Dundee defence to head down a Liam Craig freekick but the danger was cleared by Kevin Holt.
With eight minutes on the clock, Swanson cut in from the right for the hosts then let fly with a hot from the edge of the box that was well held by keeper Scott Bain.
The Dark Blues needed to get forward and they did exactly that.
Indeed, they missed an absolute sitter on 13 minutes.
Faissal El Bakhtaoui kicked the move off by feeding Paul McGowan up the right and the midfielder raced forward before cutting the ball across to striker Teijsse near the penalty spot.
The Dutchman had time and space to tee up his shot but didn’t get enough strength behind the strike, meekly passing the ball into the arms of a grateful Zander Clark.
On 21 minutes, the Dark Blues, playing in all white, were on the attack again, with Tom Hateley’s freekick being scooped away by Clark before Teijsse had a header saved.
St Johnstone won a freekick after Holt was booked for chopping down Murray Davidson but Bain did brilliantly to come out and punch away Craig’s cross.
There was another chance for the home team on 27 minutes when Davidson just stayed on his feet long enough to fire the ball across the face of the Dundee goal but it missed the outstretched boot of Chris Kane.
Davidson was harshly booked for simulation on 33 minutes after breaking into the Dark Blues’ area. It looked like his momentum made him fall as Holt challenged rather than a deliberate attempt to win a penalty.
Saints then had the ball in the net after Steven MacLean pounced on a deflected shot from Swanson but the “scorer” was offside.
Bain easily held a curled effort from Swanson as the hosts continued to press then the visitors lost El Bakhtaoui to injury, Michael Duffy replacing him three minutes before half-time.
Wotherspoon found himself in space inside the Dundee box but fell on his backside as he tried to shoot, bringing the first period to an embarrassing end.
Three minutes after the restart, Dundee’s James Vincent tried a shot from 25 yards but it smacked off the back of teammate Duffy.
Some trickery from the lively Swanson earned him the opportunity to fire at goal on 52 minutes but the ball flew straight at Bain.
Sainst got the breakthrough they probably merited on 62 minutes.
The delivery came from a Craig freekick out on the right and Anderson was lurking at the back post to volley home with his sidefoot to make it 1-0.
It was a bad goal to lose from a defensive perspective and Dundee had to somehow battle back.
They quickly brought on Craig Wighton for Ross – an attacking substitution – but it was Saints who were on the offensive next, with Swanson bringing another save out of Bain.
The home team moved two ahead on 75 minutes with a spotkick from Swanson, the former Dundee United man converting confidently after Gomis had fouled MacLean.
Michael Coulson, who had just come on for Chris Kane, nodded against the bar for Saints on 81 minutes after yet more great work from Swanson.
Dundee brought on Loy to boost their attack and he wqas the one who netted from the spot two minutes from time after Anderson had impeded Tiejsse.
However, time ran out for the visitors, who now face a huge game at home to Partick Thistle on Wednesday, while Saints can head to Ibrox that same night with confidence.
Attendance: 3,646.
St Johnstone: Clark, Anderson, Davidson, MacLean, Wotherspoon, Swanson (Paton 89), Shaughnessy, Foster, Easton, Kane (Coulson 80), Craig. Subs not used: Mannus, Alston, Millar, Gordon, Cummins.
Dundee: Bain, Holt, Vincent, O’Dea, Hateley (Loy 76), Williams, Ross (Wighton 63), McGowan, Teijsse, El Bakhtaoui (Duffy 42), Gomis. Subs not used: Mitchell, Etxabeguren, Gadzhalov, Kerr.
Referee: Andrew Dallas.