Last updated on .From the section Scottish Premiership

Dundee's hopes of Scottish Premiership survival are ebbing away after 10-man Motherwell struck in stoppage time to win a seven-goal thriller.

David Turnbull smashed in his second of the game to leave the visitors seven points adrift of second bottom St Mirren with three games to play.

Martin Woods and Ethan Robson twice put Dundee in front, but they were pegged back instantly. Turnbull and James Scott scored the levellers, and Gboly Ariyibi and Nathan Ralph traded further goals early in the second half.

The madness continued when Alex Rodriguez Gorrin was shown a red card, and then the hosts were denied a penalty when Turnbull's cross hit the hand of Genseric Kusunga.

But Turnbull's late intervention cruelly downed Dundee, who now need a miracle to avoid automatic relegation to the Championship.

How the madness unfolded

0-1: Woods scores from the spot after Ariyibi fouls Cammy Kerr

1-1: Within a minute, Turnbull's long-range strike is deflected high into the net

1-2: Robson shrugs off Charles Dunne and fires in from outside the box

2-2: Within minutes James Scott capitalises on a defensive error to squeeze in his first senior goal

3-2: Just after the restart Motherwell go in front for the first time, Ariyibi finding the bottom corner

3-3: Dundee go up the other end and Ralph heads into the roof of the net

3-3: Rodriguez Gorrin is sent off after a lunge on Curran gets a second yellow card. He was booked in the first half for a challenge on Woods

3-3: Kusunga heads against the post for Dundee

3-3: Referee Kevin Clancy looks to have awarded Motherwell a penalty for handball, but reversed the call after consulting with his linesman

4-3: Turnbull smashes in his second and the winner, after his initial effort came off the bar

'Remains to be seen if McIntyre will stay on' - analysis

BBC Scotland's Brian McLauchlin at Fir Park

Whatever happens to Dundee, serious questions will have to be asked about the quality of their defending. Twice ahead in the first half, but on both occasions they conceded equalisers within 90 seconds. Whether it is a confidence issue or a lack of belief the players have to take full responsibility for the situation the club find themselves in.

It remains to be seen if manager Jim McIntyre will have the opportunity to regroup this Dundee squad over the summer, but undoubtedly much work will be required for a Championship challenge.

Motherwell counterpart Stephen Robinson will look to blood a few more youngsters in their closing fixtures but in Turnbull they have a teenager with a gift rarely seen in Scottish football. He glides through matches with the attitude of a player way beyond his 19 years, and although the club is losing Jake Hastie to Rangers, there is much to look forward to for Motherwell next season.

'Turnbull is young player of the year' - reaction

Dundee manager Jim McIntyre: "It's obviously a game we've played a major part in throwing away. After Motherwell went down to 10 men there was a real opportunity for us to go and seize the game.

"We didn't pass the ball well enough. The fourth goal's just ridiculous, players have got to have better game management."

Motherwell manager Stephen Robinson: "David Turnbull is top class and is getting better and better by the day. He strolled through the game, scored two goals and should've had a hat-trick.

"He ran the game. For me, he's the young player of the year. If he does leave this football club, it'll be for a lot of money."