Cardiff Blues produced a scintillating second-half performance to secure a crucial 34-15 Guinness PRO14 victory over Edinburgh and give themselves the best chance of European qualification.
Dai Young’s side knew they had win and either score four tries or deny the Scots a losing bonus-point to guarantee a fourth-place finish.
That would also have been enough to secure a third place finish if Connacht caused an upset at Parc y Scarlets but in another thrilling encounter, the Llanelli-based club battled back for bonus-point win.
It appeared ominous at half-time as Cardiff trailed 10-3 following the first of two George Taylor tries for the vistors.
But Young’s side returned a different team after the break and responded with three tries from Liam Belcher, Rey Lee-Lo and Jarrod Evans.
However, there was still time to seal maximum points, and the job was completed in the final play of the game, with replacement James Ratti crashing over to finish the Guinness PRO14 campaign off in style.
The Scots came flying out of the blocks and dominated the opening ten minutes with their unrelenting physicality and intensity.
For more than 12 minutes Cardiff did little but defend and to their credit they met each wave of Edinburgh attack with defensive steel.
Finally, after weathering the storm Dmitri Arhip, who had been receiving treatment just minutes earlier, pounced for a turnover penalty to allow the Blues to venture into the Edinburgh half for the first time.
They appeared lively in attack with Matthew Morgan in particular stretching the visitors. They settled for a penalty on 15 minutes but Jarrod Evans’ effort rocketed off the post and into the hands of Rey Lee-Lo.
Again, they went on the attack and twice opportunities were created on the left only for the ball to be left behind.
Morgan was continuing to cause the Scots problems with his electric footwork but he ran into trouble one counter and became isolated. Edinburgh forced the penalty and Charlie Savala opened the scoring.
Minutes later, Evans responded, slotting a much more difficult penalty than his first, to level the scores but it could have been quickly undone.
Cardiff were penalised straight from the restart and Edinburgh went to the corner. They rumbled towards the line and broke off the back only for Ellis Jenkins to swoop for a trademark turnover.
Despite the brief respite, it did not take the Scots long to get back on the front foot and after kicking another penalty to the corner they soon claimed the opening try.
A big carry from Luke Crosbie tied in the Blues defence and they were quicker round the corner with George Taylor slicing through on an inside line.
Savala made no mistake with the conversion but was off-target with the last kick of the half as the score remained 3-10.
Like in Treviso last weekend, Cardiff came out for the second-half much improved and Evans quickly cut the deficit to 6-10.
The Blues remained in the ascent and took the lead on 52 minutes following another sustained period of pressure. Evans kicked to the corner with Olly Robinson taking the ball at the front.
When the driving lineout was brought to a halt, Cardiff reverted to a tight pick and go game with Belcher eventually burrowing over.
Evans converted and he was back at the tee within five minutes following a fine team try. It came from deep within the hosts’ 22 as Edinburgh spilled the ball and then hacked on in frustration.
Ben Thomas was first to the loose ball and he launched the counter-attack with Morgan making the line break. He fired a pass to Summerhill on the outside, who then cut inside and offloaded to Lee-Lo for the try.
Evans converted expertly from wide to give his side a deserved 20-10 lead following the flying start to the half.
However, Edinburgh came roaring back with Taylor grabbing his second try of the evening after a scrappy period of play.
The Scots converted to set up a tense finale but with the 70-minute mark approaching, Cardiff Blues pounced for a crucial try.
Spotting no one at home and Edinburgh’s defence rushing up, Lloyd Williams dinked a deft chip from the base of the ruck and it bounced perfectly for the onrushing Evans.
He knocked over the conversion to stretch the lead to 27-15 but there was more to come from the home side.
In the final play of the game, a strong carry from Hallam Amos, who had drifted in-field, put his side within touching distance of the whitewash. Carries from Dillon Lewis and Guinness Player of the Match, Turnbull, sucked in the Edinburgh defenders.
The space was created for lock Ratti to power over, sealing maximum points with his first score in Cardiff colours.