Leinster suffered their first defeat to the Ospreys in four years and had to deal with losing Fergus McFadden, Noel Reid and replacement Dave Kearney to first-half injuries.
Full-back Dan Evans scored twice as the improving Ospreys celebrated bonus-point victory over Leinster at the Liberty Stadium. It was the first time Ospreys had beaten the Irish province in their last five attempts.
Ospreys' tries came through Evans (two), Tom Habberfield and Justin Tipuric, with Dan Biggar kicking 12 points while Leinster's two tries were scored by Barry Daly and Rory O'Loughlin.
Tipuric was featuring in his final Ospreys game before joining the Wales Sevens squad ahead of the Commonwealth Games in Australia.
Ireland Grand Slam winner Joey Carbery returned at full-back for Leinster along with scrum-half Luke McGrath, who was making a comeback from a knee injury.
Ospreys produced a generally positive first half that saw them lead 19-8 at the break.
But it was Leinster who opened the scoring on eight minutes with a penalty for outside-half Ross Byrne.
Ospreys have shown signs of improvement under interim coach Allan Clarke in recent weeks and they produced a fine try on 14 minutes with Evans going over after good build-up work from Davies, Tupuric and Hanno Dirksen. Biggar converted.
A disappointing night at the Liberty Stadium. Focus now shifts to Europe and Saracens at Aviva Stadium next Sunday. #OSPvLEI pic.twitter.com/o8HI7ViXPw
— Leinster Rugby (@leinsterrugby) March 24, 2018
And nine minutes later Evans was over again thanks to a fine pass out of the back door from centre Kieron Fonotia. Biggar failed with the conversion, but Ospreys opened up a 12-3 lead.
That became 19-3 two minutes before half-time after Habberfield latched on to Ashley Beck's pass after the centre had burst into the 22. Biggar converted.
But Leinster made sure they were still in the contest going into the interval when Daly went over in the left corner latching on to Sean Cronin's kick ahead. Byrne missed the conversion.
Leinster suffered in the injury department, seeing Fergus McFadden, Noel Reid and Reid's replacement Dave Kearney forced to leave the field in the first period.
Ospreys made a positive start to the second half and secured the bonus-point try on 50 minutes when Tipuric went over after good build-up play from Beck and Fonotia.
Leinster refused to lie down and came back with a try for O'Loughlin and a penalty from Carbery which cut Ospreys' lead to eight points on 58 minutes.
However, a Biggar penalty four minutes later eased the pressure.
A fine defensive performance in the final quarter ensured no more scares for the Ospreys, with Biggar adding an injury-time penalty.
🏉 #OSPvLEI@ospreys return to #GUINNESSPRO14 action looking to record three wins on the spin and welcome Conference B leaders @leinsterrugby to the Liberty Stadium.
— PRO14 RUGBY (@PRO14Official) March 24, 2018
1️⃣5️⃣s ⬇️ pic.twitter.com/qd63cQirQp
Meanwhile, Leinster's opponents in next Sunday's Champions Cup quarter-final Saracens returned to winning ways in the Aviva Premiership as they saw off Harlequins 24-11 in their first game at the London Stadium.
Tries from returning internationals Liam Williams and Maro Itoje, plus 14 points from the boot of Alex Lozowski, proved the difference in front of a crowd of 55,329.
Despite Owen Farrell and George Kruis being unavailable, Saracens were able to call on six of their international heavyweights following the conclusion of the Six Nations.
And Itoje shrugged off criticism from Clive Woodward suggesting he looked "out on his feet" for England during the championship to deliver a man-of-the-match performance as second-placed Saracens bounced back from defeats to Exeter and Leicester.
Elsewhere, London Irish began life under former Ireland coach Declan Kidney with a narrow 33-29 defeat to Gloucester in a Madejski Stadium thriller.