|Leinster (16) 19|
|Tries: Leavy Con: Madigan Pens: Madigan 4|
|Ospreys (3) 16|
|Tries: Baker Con: Davies Pens: Davies 3|
Second-placed Leinster maintained their 100% home winning record in this season's Pro12 to move to within two points of leaders Connacht at the RDS.
The hosts led 16-3 at half-time with the aid of a Dan Leavy try.
Dan Baker's 60th-minute touchdown gave the visitors hope but despite their stirring second-half fight-back, they had to settle for a losing bonus point.
Ian Madigan landed a conversion and four penalties for Leinster, while Sam Davies kicked 11 points for Ospreys.
Leo Cullen's men made hard work of it in the end, scoring a lone penalty from Madigan in the final 50 minutes.
Sean Cronin and man of the match Ben Te'o stood out in attack for Leinster, whose defence managed to frustrate the Welshmen until Baker's try midway through the second half.
Davies converted, adding to his two earlier penalties, to put just three points between the sides. Madigan and Davies swapped further kicks, but Leinster did just enough to hold on in a nail-biting climax.
Leinster keep up pressure on Connacht
The result sees Leinster keep the pressure on provincial rivals Connacht at the top of the table, while it was a further dent to the Ospreys' top-four and Champions Cup qualification hopes.
Davies, who nursed a rib injury late on, had left-footed the Ospreys into the lead with a third minute penalty, as Leinster struggled to get into their stride early on.
Rhys Webb and Davies' quick distribution from half-back, combined with strong carrying from back rower Baker, gave the visitors some promising attacking opportunities.
However, it took just one midfield break to open up the defence for Leinster's first try. Madigan attacked the space offered to him off the side of a scrum, combining with the onrushing Fergus McFadden who fed Leavy to touch down to the right of the posts.
The flanker's seven-pointer was added to by a Madigan penalty and Leinster were beginning to purr, with the powerful Te'o crashing through in the centre.
Leinster rewarded for link-up play
Cullen's charges absorbed some further pressure before Madigan made it 13-3, rewarding Cronin, Te'o and Eoin Reddan for some lovely link-up play.
With the wind picking up at Leinster's backs, Baker was pinged for not rolling away on the half hour and Madigan slotted the central penalty for a 13-point gap.
The Ireland fly-half pushed a long-range effort wide five minutes before the break, and the Ospreys went unrewarded for a breathless late spell sparked by a Jeff Hassler run.
Into the second period, Davies' second successful penalty gave the Welsh region some encouragement but they failed to profit from a couple of close-range lineouts.
Ospreys number eight Baker stepped out of a tackle from Hayden Triggs to finish smartly by the posts on the hour mark, with Davies adding the extras.
Madigan punished a high tackle with Leinster's first points for 34 minutes, but poor discipline from the Irish province saw Davies respond almost immediately for 19-16.
How they lined up
Leinster: Zane Kirchner; Fergus McFadden, Garry Ringrose, Ben Te'o, Isa Nacewa (Capt); Ian Madigan, Eoin Reddan; Cian Healy, Sean Cronin, Mike Ross, Ross Molony, Mick Kearney, Rhys Ruddock, Dan Leavy, Jordi Murphy.
Replacements: Richardt Strauss, Peter Dooley, Tadhg Furlong, Hayden Triggs, Dominic Ryan, Luke McGrath, Cathal Marsh, Noel Reid.
Ospreys: Dan Evans; Jeff Hassler, Josh Matavesi, Owen Watkin, Ben John; Sam Davies, Rhys Webb (Capt); Nicky Smith, Sam Parry, Dmitri Arhip, Tyler Ardron, Rory Thornton, James King, Olly Cracknell, Dan Baker.
Replacements: Scott Otten, Gareth Thomas, Ma'afu Fia, Adam Beard, Joe Bearman, Tom Habberfield, Jonathan Spratt, Tom Grabham.
Referee: Ian Davies (Wales)
Assistant referees: Mark Patton, Richard Kerr (Ireland)
Citing commissioner: Eugene Ryan (Ireland)
TMO: Olly Hodges (Ireland)