Shane Williams signed off in the most brilliant of fashions when his late try capped a remarkable fightback by the Ospreys, as they were crowned RaboDirect PRO12 champions.
Dan Biggar gave the Welsh region early lead as he began a strong kicking performance with three early points, after Leinster infringed at the ruck.
But that kick was cancelled out two minutes later when Leinster fly half Johnny Sexton made up for his earlier miss with his first of the game.
The Ospreys route to the final had been built on a rock solid defensive game and they needed every bit of it as the Irishmen attacked the Ospreys 22 time and time again.
The pressure, though, provided Ashley Beck with a timely interception and a 60 metre foot race for the line - a race he was unable to win, but one which did provide Biggar with three more points from in front of the posts.
The Leinster attacks did finally proved fruitful on twenty five minutes when hooker Sean Cronin crossed in the corner, after neat build up down the left.
The first half's turning point came, ironically, from a moment of Ospreys fortune, as Biggar's boot brought the difference back to just a single point.
That kick prompted a restart and straight from it the Ospreys were caught napping. Sexton's high kick was gladly gathered in by Isa Nacewa on the 22m, who proceeded to cut straight through the unsuspecting defenders for Leinster's second try of the afternoon.
Trailing by eight at the break the Ospreys were in need of impetus, and that is exactly what was provided within two minutes of the restart when the impressive Ashley Beck ran clear of the Leinster back-line to bundle over for the Ospreys opening try.
The end-to-end rugby continued as Nacewa crossed for his second of the game, seemingly putting the Welsh region out of touch.
But, as the saying goes: 'Cometh the hour, cometh the man' - and that man, Shane Williams, rose to the occasion.
This was his last game in an Ospreys shirt and he gave the occasion the moment every travelling fan had hoped for, as he picked up Hanno Dirksen's short pass to touch down in the corner.
Ospreys fans dreamt of a fairytale in the making but Nacewa seemingly put paid to that with his third try of the match - a try that was converted to put the score at 30-21.Shane Williams, though, has built his career on taking the moments that mean the most - and this was one that was, it seemed, already written in rugby folklore.
With time running out and the Ospreys trailing by six, the Ospreys pack recycled the ball with ease as they inched towards the Leinster line.
And at the decisive moment - the moment at which Williams has aligned himself for time eternal, up he stepped, to finish with the panache with which he will forever be remembered.
All that was left was for Biggar to kick the decisive conversion, which he did, and the Ospreys were RaboDirect PRO12 champions. A fitting end to a remarkable career.