Ally Roy netted for the Candystripes on three minutes but Ryan Brennan levelled on 34 minutes after Conan Byrne had rattled the Derry woodwork.
Amid drama, Derry keeper Gerard Doherty saved a Killian Brennan spot-kick before Patterson’s 88th-minute winner.
St Pat’s ended the game with nine men while the Candy Stripes were reduced to ten player during a flurry of red cards.
St Pat’s Ian Bermingham and Thomas Byrne were sent off in the closing seconds with Derry’s Eoin Toal.
The players saw red following afracas in the Derry penalty area.
Substitute Patterson’s goal came with his first touch shortly after his introduction following great work by Aaron McEneff.
After a run of eight defeats in their previous 11 Premier Division matches, Derry boss Kenny Shiels had described Friday’s contest as “must-win” for their seemingly fading hopes of securing European football.
However with third-placed Waterford losing 2-1 in Limerick, the Candystripes are now only five points off the final automatic European spot after winning the first in a series of four straight home games.
Defeat would have also dropped Derry to sixth place in the table but they now have a six-point cushion over the Dublin club.
City’s next league match is next Friday night. August 3, against Sligo Rovers at the Brandywell.
Rovers went down 2-0 to Shamrock Rovers at Tallaght tonight.Tags: