Last updated on .From the section Scottish Premiership

Dundee manager Neil McCann praised his players for not settling for a point after Dundee equalised with five minutes remaining at Dens Park.

Sofien Moussa scored two minutes from the end with a header to secure three vital points in the relegation battle.

It was his second goal of the game, after a first-half opener, with Steven MacLean then drawing Saints level.

"It would have been easy for us to feel sorry for ourselves, but we went for it," McCann said.

"We had to earn it. Moussa was fantastic, his all-round play, the holding up, his work rate, and it was a super header.

"I really don't have a failure and that goes to the bench as well. What a big three points, I'm so happy."

McCann had to watch from the stand as he served a one-match touchline ban following a confrontation with members of the St Johnstone bench when the teams met last month.

Dundee manager Neil McCann watched from the stand as he served a one-match suspension

"I was pretty far from being relaxed, I didn't enjoy that one bit," McCann said.

"I've seen managers in the past spend time [in the stand] and I can understand why they want to get down. Unfortunately I wasn't allowed to. I'm so proud of everybody involved, because it's a big result."

The post-match events in the previous game prompted a feud between the two managers that rumbled on prior to kick-off in their pre-match interviews on BBC Scotland's Sportsound programme.

McCann said there was no way communication would be restored with his Saints counterpart Tommy Wright, the latter responded by saying that would have no effect on his life.

What did have an effect for the visiting manager, an adverse one, was seeing his side go a goal down in the first minute.

St Johnstone manager Tommy Wright was unhappy with his side's defending

"If you take the first two minutes and the last two minutes out of it, it was very good and we should have won the game," Wright said.

"But from where their free kicks are, we shouldn't lose goals from those positions. We've shot ourselves in the foot with the start we made, but we got back in the game, we forced corners, but it's a stupid foul to give away and it was poor defending for the goals."

In the opening minutes, Kevin Holt's delivery from a free kick midway inside the Saints half was met on the volley by Mark O'Hara 12 yards out. The ball was flicked on by Moussa and struck the inside of the left-hand post before crossing the line for the striker's 11th goal of the season.

The visitors were stunned by that opening, but they played their way into the game and Scott Tanser fired a 20-yard shot wide after Steven Caulker's headed clearance from a Richard Foster cross from the right dropped onto his left foot.

Dundee goalkeeper Elliott Parish made two fine saves to prevent Saints equalising before the break. He first tipped a Chris Millar cross from the right over the bar as it looked to dip in at the back post. He then followed that up with an excellent reaction save to parry clear a Matty Willock shot on the turn from eight yards.

Dundee striker Craig Wighton returned to the side after a long injury lay off and almost scored

Near the end of the first half, the home side came close twice to increasing their lead. Craig Wighton, making his first start after a long injury lay off, cut in from the left before releasing a shot which was deflected wide.

Simon Murray then should have done better than screw his shot wide after being set up by a neat cutback from Glen Kamara.

Early in the second half, Murray posed a greater threat to the St Johnstone defence. A neat pass from Paul McGowan, Dundee's captain for the day, released Murray on the right and he strode into the Saints box before unleashing a shot which was tipped round the post by Zander Clark.

At the other end, St Johnstone captain Shaughnessy almost found a leveller. The big defender connected with a Millar cross from the left with an acrobatic left-foot volley from 10 yards which rattled back off the crossbar.

Murray was once more denied by the St Johnstone goalkeeper as Clark dived to his right to turn away his low powerful strike from a 25-yard free kick.

St Johnstone striker Steven MacLean eventually delivered the equaliser for his side

Moussa sent a header over the bar from a McGowan free-kick as they looked for a second goal that would provide them with an ideal cushion for victory.

St Johnstone's persistence paid off. though, as MacLean equalised with a low driven shot from 14 yards as Dundee failed to clear at the edge the box.

But there was further late drama as Moussa claimed his and Dundee's second of the afternoon two minutes from the end with a powerful header from Cammy Kerr's free kick.

This was Dundee's first win in six matches and may well prove a vital three points in their attempt to secure their Premiership place for next season.