St Johnstone moved up to fourth in the Scottish Premiership after seeing off a lacklustre Dundee at McDiarmid Park.

Steven Anderson broke the deadlock when he drifted in at the back post to get his boot to Liam Craig's free-kick.

Danny Swanson doubled the lead from the penalty spot after Kevin Gomis brought down Steven MacLean.

Michael Coulson's header hit the bar as Saints sought a third, before Rory Loy gave Dundee late hope with a penalty after Yordi Teijsse was bundled over.

Although they were under the cosh in the opening proceedings, it was Dundee who had the first real opportunity of the game, but Teijsse's effort from Paul McGowan's fine pass was poor and straight at Zander Clark in the Saints goal.

The home keeper was again called into action when he parried a Tom Hateley free-kick behind for a corner.

Dundee striker Fassail el Bhaktaoui was not having the best of days and, when he took a knock on his calf just before half-time, manager Paul Hartley decided to make the change with Michael Duffy the replacement.

Swanson was posing a real threat for Saints down the left hand side and forced a save out of Scott Bain in the visitors' goal early in the second half.

Just after the hour mark the home side deservedly made the breakthrough.

Craig floated a free-kick deep into the Dundee box and Saints captain Anderson volleyed the ball high into the roof of the net.

Danny Swanson scores a penalty
Danny Swanson scored from the penalty spot to make it 2-0
The hosts then doubled their advantage when referee Andrew Dallas pointed to the spot after a challenge by Gomis on MacLean.

Swanson stepped up and blasted the ball home, piling more misery on the Dundee fans who made the short trip to Perth.

The influential Swanson had teased the Dundee defence all afternoon and in the move of the game he set up Coulson for a header that came back off the crossbar with Bain rooted to his line.

With two minutes left Dundee pulled one back when Teijsse was pushed to the ground by Anderson and substitute Loy sent Clark the wrong way from the spot.

Despite a spirited onslaught, Saints held on for victory with Dundee - who have now lost five in a row - remaining at the bottom of the table.