Edinburgh 23-36 Leinster
Leinster came from behind to end their season on a high note with a 36-23 win over Edinburgh at Murrayfield.
Sam Hidalgo-Clyne's penalty gave the hosts a 23-22 lead with 15 minutes to play, but converted tries by Jordi Murphy and Luke McGrath ensured Leinster finished fifth in the Pro12 and remain second seeds for next year's Champions Cup.
The win also helped Connacht to qualify for the Champions Cup play-off in denying Edinburgh the win they needed to leapfrog the Westerners in the league table.
The home side's points came through tries by Hamish Watson and Tim Visser, in what was his final appearance for the club before joining Harlequins, while Sam Hidalgo-Clyne kicked the other points.
Leinster's pace on the counter attack was the source of tries for Noel Reid, Jack Conan, Zane Kirchner, Murphy and McGrath, while Ian Madigan weighed in with an 11-point kicking haul as the Irish side secured the win that boosts their seeding for the Champions Cup draw.
With the early exchanges out of the way, Edinburgh sparked the game into life when Visser made a break from deep. That foundered on the lack of support, but the hosts followed up with a spell of pressure that yielded a penalty. Hidalgo-Clyne slotted the kick to nudge the home side into the lead.
Leinster stepped up the pace and drew level after 15 minutes when, with the referee playing advantage, Madigan notched a drop goal. And the visitors built on that score two minutes later.
Madigan passed the ball inside to Sean O'Brien whose deft flip to Reid wrong-footed the Edinburgh defence and allowed the centre to canter through the haphazard Edinburgh defence for an absurdly easy score, which Madigan converted.
Edinburgh had a chance to trim the deficit a couple of minutes later but Hidalgo-Clyne made an imperfect contact with his attempt on goal and the chance went awry.
However, the momentum was back with the hosts and they went close when Visser combined with Dougie Fife who was shunted into touch just short of the whitewash. But, when Leinster failed to tidy up at the ensuing lineout, Hidalgo-Clyne pounced and fed Watson who pirouetted and darted over, leaving Hidalgo-Clyne a simple conversion to restore parity.
The visitors struck back almost instantly and Dave Kearney raced into opposition territory before drawing the last defender and releasing Jack Conan who sprinted in between the posts for a try which Madigan converted to send the Irishmen in at the interval with a 17-10 lead.
A scrum offence four minutes after the restart presented Hidalgo-Clyne with a simple three-pointer that breathed new life into Edinburgh's hopes.
That optimism proved to be short-lived as a multi-phase riposte by Leinster stretched the home defence before the ball was flung out wide to Kirchner who dotted down for an unconverted try.
With their European qualification hopes hanging by a thread, Edinburgh had to score next.
And they did so after 56 minutes when Hidalgo-Clyne picked up at the base of a ruck inside the Leinster 22 and sent the ball out wide to Visser who was halted but not held and plunged in at the corner.
Hidalgo-Clyne thumped over the conversion to leave the hosts two points adrift and, with 15 minutes left on the clock, the scrum-half edged the hosts in front with his third penalty of the afternoon.
However, that slender margin was never likely to be sufficient and so it proved when slick handling pulled the Edinburgh defence wide, creating the space for Murphy to cross for the bonus-point score.
Madigan's conversion took the gap to six points. And he again added the extras after McGrath burrowed over for try number five three minutes from full-time.