St Patrick's Athletic's title hopes suffered a severe setback at the Brandywell when Derry City gained revenge for two defeats this season.
And the goal which decided the points was netted by an unfortunate St Patrick's defender, William Gibson in the 66th minute.
A Ruaidhri Higgins cross was met by Gibson and while he attempted to head the ball back to advancing keeper, Barry Ryan, the effort sailed wide of the keeper and into the unguarded net.
Derry dominated the scoring chances but the failed to force Ryan into a serious save.
Joseph Ndo had the best chance for the visitors but blasted the ball over the bar, when he looked more likely to score.