Cardiff Blues will go into the play-offs for the Champions Cup with a spring in their step after taking the Guinness PRO12 derby spoils at Newport Gwent Dragons.
The Blues triumphed 26-24 in Caerphilly thanks to tries by full-back Matthew Morgan and centre Willis Halaholo plus 16 points from the boot of fly-half Gareth Anscombe.
The men from the capital finish seventh in the table and now wait to see which French opposition they will tackle in the semi-finals for a place in next season's premier European competition.
The Dragons, meanwhile, slipped below Treviso into 11th after a miserable campaign in which they have not won since January.
With the game moved to Caerphilly while Newport County attempted to secure League Two survival at Rodney Parade, the Dragons came out firing and were on the scoreboard inside a minute with a well-crafted score.
They charged into the 22 and fly-half Angus O'Brien found full-back Carl Meyer unmarked on the right with a kick for the simplest of tries.
O'Brien missed the conversion but banged over an eighth-minute penalty to make it 8-0 to the hosts before the Blues exploited his error in the 16th minute.
The Dragons number 10 failed to gather a kick through and it was hacked on by Wales wing Alex Cuthbert for full-back Morgan to dot down in the left corner.
Fly-half Gareth Anscombe added a fine conversion only for a penalty for a high tackle to enable the hosts to go 11-7 in front through the right boot of O'Brien.
However, he then missed a drop goal and it was the men from the capital who went into the break with the lead after a second converted try, centre Halaholo showing wonderful balance to jink over after half an hour.
The Blues had their noses in front 14-11 going into the second half and they extended that by three points through Anscombe with half an hour remaining.
The hosts' chances were further hit approaching 60 minutes when former Wales hooker Rhys Thomas was yellow-carded against his former side for a high tackle.
It was one-way traffic with the Blues putting the squeeze on inside the 22, turning down shots at goal in favour of going for a third try to kill the game.
Eventually they settled for a three-pointer, with Anscombe making it 20-11 with 15 minutes left - only for Meyer to swiftly cancel that out from long range before a second sweet strike made it 20-17 with eight minutes remaining.
A dominant Cardiff scrum allowed Anscombe to ease the nerves with five minutes left and then the fly-half sealed the victory in the 78th minute, although the Dragons had the final say with a last-minute try by centre Sam Beard, converted by O'Brien.