Anto Murphy and Karl Moore provided the goals to keep Bohemians' tenuous hopes of qualification for Europe alive as St Patrick's finished with 10 men at Dalymount Park.
The derby victory for Bohemians, their first in six games, shortens the gap on St Patrick's to five points in the battle for fourth place and the one remaining Europa League spot.
St Patrick's started purposefully with only the bravery of Bohemians' Dave Mulcahy surely preventing the visitors from taking a seventh minute lead.
Christy Fagan met skipper Ger O'Brien's cross with a first time, goal bound volley that cannoned back off the face of central defender Mulcahy.
In a similar scenario five minutes later, Mulcahy's defensive partner Murphy got his body in the way to deflect a Conan Byrne shot out for a corner.
Bohemians keeper Dean Delany was then worked for the first time minutes later when getting down at his right-hand post to parry away a header from Jason McGuinness.
But having rode their luck, Bohemians stole the lead totally against the run of play on 14 minutes.
Eoin Wearen swept a deep ball in from the right flank for Murphy, who arrived unattended to side-foot home from close range.
Not fazed, St Pat's continue to pace the ball well with Delany making another decent save from a header by McGuinness after Aaron Greene's dinked cross on 35 minutes.
The Inchicore side lost O'Brien, central to much of their attacking play on the right, to injury on 37 minutes.
Four minutes later Liam Buckley men might have been further behind as a Lorcan Fitzgerald free kick in from the right flew across the face of their goal, failing to get the touch that would have put it into the net.
But Bohemians had Delany to thank on 42 minutes for the save of the first half.
Jamie McGrath laid the ball off for Byrne whose blasted shot was brilliantly parried away by the Bohemians' keeper.
St Pat's hopes of getting back into it were dealt a blow when McGuinness was sent off on 52 minutes for a tug back on Ismahil Akinade, his second card inside three minutes.
Fitzgerald curled a free kick wide before Bohemians doubled their lead on 62 minutes.
Jake Kelly did well to shield the ball before laying it off to Moore.
And the little winger cracked his shot off the underside of the crossbar with the ball bouncing down over the line, duly spotted by alert assistant Michelle O'Neill who flagged to give the goal.