Derry City made it three wins in a row in the Airtricity Premier Division at the Brandywell, but they had to work very hard to claim the points against St Pat's.
The Dubliners had a host of chances but Aaron McEneff's brace and a super goalkeeping display by Gerard Doherty ensured Kenny Shiels' side kept up their impressive home form.
Pat's would have had a glorious chance to take an early lead as Dean Clarke's left wing centre would have picked out an unmarked Ryan Brennan, but for an outstanding sliding clearance by the back-tracking Rory Hale.
The deadlock was broken on nine minutes as Aaron McEneff won possession inside the St Pat's penalty box, before blasting home, giving keeper Barry Murphy no chance.
The Dubliners should have levelled things on 23 minutes as Jake Keegan saw his close range strike saved by Gerard Doherty and Clarke's follow-up shot came back off the crossbar.
From Conan Byrne's resulting corner the visitors thought they had levelled things but Keegan's goal was controversially disallowed by referee Robert Harvey, the referee felt the Dubliner was in an offside position.
On 42 minutes St Pat's missed another glorious opportunity as another high ball caused problems for the home side, but Clarke was unable to turn the loose ball home from some six yards out.
Early in the second half another Byrne right wing corner was nearly turned into his own net by Eoin Toal, but Doherty got down to keep the effort out. St Pat's continued to dominate things as they made a double change on 69 minutes with Christy Fagan and James Doona replacing Jake Keegan and Ryan Brennan.
The home side doubled their advantage when McEneff gathered Paterson's pass, sidestepped a tackle, before slamming a brilliant finish to the roof of the net.
St Pat's were denied a goal on 79 minutes as Owen Garvan's close range strike after a neat passing move, was somehow kept out by a diving Doherty.
The visitors deservedly pulled one back a minute later as another goal mouth scramble ended with Clarke turning the ball home from close range.
On 88 minutes Simon Madden's right wing cross found an unmarked Clarke, but the striker's glancing header was easily saved by Doherty.
Right at the death Patterson should have sealed the points for City, but he somehow fired over from close range, after Rory Hale's centre had fallen perfectly to him.
Deep into stoppage time Doherty had to make another top draw save as he dived to keep out James Doona's goalbound strike, before Darren Cole got back to clear the loose ball off the line.
Derry City: G Doherty, McDermott, Toal, Cole, Doyle; Rory Hale, McEneff, B Doherty (Hopkirk 59); Curtis, Patterson, Ronan Hale.
St Patrick's Athletic: Murphy, Madden, Toner, Desmond, Bermingham; Byrne, Garvan, Brennan (Doona 69), Lennon, Keegan (Fagan 69), Clarke.
Referee: Mr Robert Harvey (Dublin).