A second-half comeback earned Bohemians sweet revenge for a 4-0 reversal at Dalymount Park back in March as they won this frantic Dublin derby to keep St Patrick's deep in relegation trouble, second bottom of the SSE Airtricity League Premier Division table.
St Pat's had the better of the first half and were good value for Alex O'Hanlon's lead goal.
But Bohemians stormed back after the break with strikes from Oscar Brennan, Dinny Corcoran and Gerogie Poynton.
After a cagey start, the game settled with St Pat's the more promising early on - Kaleem Simon doing well to get back to nick the ball off the toe of Conan Byrne as the Saints' winger was about to pull the rigger.
Bohs then threatened as Keith Ward pulled their first effort on goal wide six minutes later after Corcoran won the ball from Sam Verdon in the middle of the park.
Fast and frenetic, the game lacked quality before the tenacity of Conan Byrne provided some on 16 minutes as Saints' finally carved the first real chance of the game.
A good advantage was played as Ian Morris was initially flagged for a foul on Byrne on the right touchline. Referee Neil Doyle played on with Byrne keeping his balance to run on and cross low into the area where Rob Cornwall defended superbly in blocking Darragh Markey's shot.
St Pat's lost Kurtis Byrne to injury on 21 minutes, but it didn't take his replacement O'Hanlon long to set up skipper Ian Bermingham whose shot lacked the power to trouble Shane Supple.
Conan Byrne remained St Pat's main threat on the right and he drilled wide across goal on 25 minutes after good work from makeshift right-back Graham Kelly.
Maintaining their momentum, St Pat's troubled Bohs again with Markey shooting straight into the hands of Supple from the edge of the area after Kelly did well to get away on the right to cross following a clever one-two with Christy Fagan.
JJ Lunney then worked space for himself in from the left without really working Supple before the home side deservedly took the lead on 40 minutes.
Again it stemmed from the left flank with the influential O'Hanlon coming in, showing clever feet to make the space, before beating Supple to the far corner of the keeper's net with a crisp low right-footed shot for a lovely first goal for the club.
With Paddy Kavanagh on for the ineffective Kaleem Simon, Bohemians had far more about them on the resumption and they punished defensive dithering to equalise six minutes in.
St Pat's keeper Conor O'Malley and Bermingham seemed to get their wires crossed as Brennan stole in from a tight angle to shoot to the far corner of the net.
The home side regrouped and Lunney should have done better than fired over the top after Byrne and Markey created a clearcut chance to regain the lead just before the hour.
But Corcoran then put Bohemians ahead on the counterattack on 69 minutes.
Keith Ward, one of the best technicians on the pitch, weighted a precise ball through for the run of the big striker who showed superb composure to rifle to the net for his ninth goal of the season.
The influential Ward then set up Poynton for Bohs' third strike on 86 minutes with the midfielder racing in to drill past O'Malley for a fine finish.