The Ospreys spoiled Brian O'Driscoll's return from injury as they claimed a shock 23-22 win over Leinster at the RDS.
A 77th-minute try from hooker Richard Hibbard was converted via the top of the post by Dan Biggar, ending the PRO12 leaders' 20-game unbeaten streak.
Fergus McFadden scored three penalties and converted Ian Madigan's try as the Irish province led 16-6 at the break, Dan Biggar replying for the visitors.
McFadden added two more three-pointers in the second half, but the Welsh region hit back with a try from George Stowers and five more points from Biggar, before it was left to a converted try from Hibbard to steal the win.
Top-of-the-table Leinster have only lost two games all season and find themselves nine points clear of second place Munster. A victory here would not only have virtually guaranteed their passage into the play-offs, but also a home semi-final.
In the second minute centre McFadden slotted a penalty, but Biggar responded with one of his own for the visitors. The hosts' kicker then added a second three-pointer of the evening before converting another opportunity after 26 minutes.
Madigan then went over for the Irish province as they opened a 16-3 lead. However, Biggar scored his second penalty just before the interval.
The second half continued in the same vein with Leinster dominating and McFadden converted another from the tee. However, the Ospreys mounted a quick-fire fightback.
After their fly-half had reduced the deficit, Stowers powered over to take the score to 19-16. Their resurgence was curtailed, though, when McFadden added his fifth penalty and Justin Tipuric was sin-binned.
However, in a dramatic finale, Hibbard bundled over and Biggar converted to seal a remarkable win.
Pens: McFadden 5
Tries: Stowers, Hibbard
Cons: Biggar 2
Pens: Biggar 3
Yellow card: Justin Tipuric (Ospreys, 62)
Leinster: 15 Isa Nacewa, 14 David Kearney, 13 Brian O'Driscoll, 12 Fergus McFadden, 11 Luke Fitzgerald, 10 Ian Madigan, 9 Isaac Boss, 8 Leo Auva'a, 7 Dominic Ryan, 6 Rhys Ruddock, 5 Brad Thorn, 4 Leo Cullen (c), 3 Nathan White, 2 Richardt Strauss, 1 Heinke van der Merwe.
Replacements: 16 Sean Cronin, 17 Jack McGrath, 18 Jamie Hagan, 19 Damian Browne, 20 Kevin McLaughlin, 21 John Cooney, 22 Eoin O'Malley, 23 Fionn Carr.
Ospreys: 15 Richard Fussell, 14 Hanno Dirksen, 13 Andrew Bishop, 12 Ashley Beck, 11 Eli Walker, 10 Dan Biggar, 9 Kahn Fotuali'i, 8 George Stowers, 7 Justin Tipuric, 6 Tom Smith, 5 Alun Wyn Jones (c), 4 Ryan Jones, 3 Aaron Jarvis, 2 Richard Hibbard, 1 Paul James.
Replacements: 16 Scott Baldwin, 17 Ryan Bevington, 18 Adam Jones, 19 Ian Evans, 20 James King, 21 Rhys Webb, 22 Matthew Morgan, 23 Tom Isaacs.
Referee: Peter Fitzgibbon (Ireland)