The Ospreys soared above Leinster to fifth in the Magners League table with a 19-15 success at a freezing Liberty Stadium.
The home side were outscored two tries to one and had to rely on Leinster going down to 13 men to get their one such score - a penalty try in the second half - with their other 14 points all coming from the boot of outside-half Dan Biggar.
Some encouraging line breaks by the Ospreys, who were without 21 players including 12 on international duty, produced a first penalty goal for Biggar after nine minutes before that was cancelled out by an Isikeli Nacewa penalty.
Leinster made ground into Ospreys territory through half-backs Ian Madigan and Isaac Boss, with lock Ian Evans penalised for not rolling away.
It was a poor period for the home side, who had prop Duncan Jones sin-binned for coming in from the side just after the referee had issued the Ospreys a warning.
And three minutes later Leinster were over for the only try of the half, started and finished by wing Andy Conway who was sent in by Nacewa after some poor defence by the Ospreys.
Back to 15 men, the hosts gradually ate away at Leinster's 10-3 advantage with Biggar putting over penalties on 35 and 39 minutes.
Leinster made a change at prop at half-time, with Mike Ross replacing Clint Newland at tighthead, but it did not make much difference as they were penalised from the first set-piece, with Biggar putting over his fourth penalty to give the Ospreys the lead.
But it was a short-lived advantage as Leinster scored a second try three minutes later. Richard Fussell mis-timed his slide to collect a ball by his line and Nacewa was on hand to pick and get the ball down.
The game was held up for 10 minutes while Conway was treated for a whiplash injury which saw him taken from the pitch by stretcher.
The match took a dramatic twist when Leinster suffered two sin-binnings in the space of three minutes. Both lock Ed O'Donoghue and outside-half Ian Madigan saw yellow for ruck offences.
With the two-man advantage, the Ospreys pressed and, after a series of five-metre scrums, were awarded a penalty try which Biggar converted.
The Ospreys were on the back foot for the rest of the game but Nacewa missed a penalty on 68 minutes and Leinster then failed to make a last-minute catch-and-drive from an attacking line-out count.