Cardiff Blues kept alive their faint hopes of securing a place in next season's new-look European Cup with a thrilling 17-13 success over Scarlets in a game marred by two red cards.
After lengthy discussions in the second half, Blues number eight Robin Copeland was dismissed for stamping, while Scarlets full-back Liam Williams, who had received a yellow card early on, was given another for killing the ball as play continued.
But it was the off-key kicking of Wales fly-half Rhys Priestland which proved costly for the Scarlets, although their losing bonus point means they are still almost certain of clinching a European spot.
In the first game of the Welsh regional double-header at the Millennium Stadium, the resurgent Blues, whose victories in their last two matches had rescued a disappointing season, enjoyed a flying start.
They gained an early position at the corner and although Copeland was held up short, Wales wing Alex Cuthbert joined his forwards and stretched to touch down on the line for an unconverted try.
Cuthbert was the victim in the next significant incident, rising to catch a Scarlets kick only to be taken out in mid-air by the over-enthusiastic Liam Williams, who was handed his first yellow card after referee Ian Davies had watched it again on the big screen.
The Blues kept up the pressure on the 14-man Scarlets and picked up two penalties from fly-half Gareth Davies, but an apparent try by impressive flanker Macaulay Cook was ruled out for a forward pass and they were unable to take further advantage before Liam Williams returned.
The visitors had their first chance to get on the scoreboard when they were awarded a penalty on halfway, but Priestland's kick rebounded off a post.
The Wales fly-half was soon smiling, however, racing over after Jake Ball had collected a loose ball when Gareth Davies had a kick charged down.
But Priestland then missed the conversion in front of the posts, an error rubbed in when Gareth Davies slotted over another penalty.
Outstanding Scarlet prospect Jordan Williams knifed through in midfield, only to spill the ball as he tried to offload.
But Priestland finally landed a penalty with the last kick of the first half.
And the west Wales region carried their momentum into the second period, hammering away at close range before spreading the ball wide for Jordan Williams to dive over.
The Scarlets' celebrations were short-lived, the TMO ruling that the final lobbed pass by centre Jonathan Davies had been forward.
Priestland missed another penalty and then came the sensational double sending-off.
Blues full-back Dan Fish was just too late to beat the covering defence in a chase for his own kick ahead and team-mate Gareth Davies showed his own fallibility by missing a straightforward penalty.
There was another lengthy delay as the officials examined a clash between the bearded Ball and Blues replacement prop Scott Andrews, but in the end took action against neither.
A superb run by Scarlets hooker Ken Owens launched an attack which skipper Jonathan Davies carried into the home 22 and, when play resumed after an injury, it was Owens who darted over for a try.
But Priestland's replacement at fly-half, Steve Shingler, was wide with the conversion that would have given his side the lead.
Gareth Davies promptly kicked his fourth penalty before the Blues survived a torrid last five minutes to secure a vital victory.