Liam Boyce produced a priceless late winner from the penalty spot to hoist Ross County six points off the bottom of the table after a fraught and tension-packed tussle with Dundee.
The Northern Ireland international kept his cool in the final minute after Michael Gardyne was brought crashing down in the box.
Both sides finished the match with ten men after Dundee’s Danny Williams joined Jim O’Brien for early baths in the last ten minutes.
The Dingwall team leapfrogged the Dens men into eighth place by grasping only their second league win since the Hogmanay Highland derby triumph.
With a fierce wind in County faces, they took a seventh-minute lead to stun a Dundee side trying to recover from that 7-0 rout by Aberdeen.
O’Brien was sharp to spot Boyce making a run into the left side of the box and the striker jinked his way past Kevin Gomis before cutting the ball back for Tim Chow to stroke home from eight yards.
The first half closed in controversy – with Dundee drawing level from the penalty spot. Marcus Haber’s head-flick sent Henrik Ojamaa racing into the County penalty area and when the Estonian tumbled as he surged past Marcus Fraser, referee John Beaton pointed to the spot.
County protested furiously, but Dens Park captain Darren O’Dea powered the penalty high past keeper Scott Fox.
County pressed well after the break but their impetus was halted on 80 minutes. O’Brien went down in the area under Kevin Holt’s attentions and he received a second booking, this one for diving.
The ten men had to decide whether to stick or twist and County kept pressing for a winner – and that bold approach was to pay off handsomely at the death. Gardyne, controlling and heading away from goal, was brought down in the box by Mark O’Hara. Boyce, with great calm, sent Scott Bain the wrong way for a vital winning goal.
The drama wasn’t over as O’Hara was booked for diving in the home box and then Williams saw red for a second booking for mouthing off to the official. The defeat leaves Dundee just five points off the bottom.