Rory Patterson scored two penalties as Derry beat Dundalk to move within two points of league leaders Sligo.
Dundalk dominated the early stages and Vinny Faherty fired the hosts ahead before Patterson levelled from the spot after a push on Ruaidhri Higgins.
Barry McNamee hit the top corner before Patterson slotted in another penalty, given for handball against John Sullivan, after 67 minutes.
City's Shane McEleney was red-carded for use of the elbow on 73 minutes.
Sligo have the chance to restore a five-point advantage when they host Cork City on Saturday.
Faherty's opener after 18 minutes, from a fine pass Keith Ward pass, was reward for Dundalk's bright opening to the game.
Dundalk were unhappy with referee Neil Doyle decision's to award a penalty for Mark Rossiter's challenge on Higgins, which Patterson converted on 31 minutes.
McNamee made it 2-1 in the 56th minute, the midfielder rifling in from 18 yards.
Candystripes keeper Gerard Doherty kept out a Darren Meenan strike before Patterson calmly stroked home his second spot-kick.
Derry held firm after McEleney's straight red, for a foul on Tiarnan Mulvenna, to continue their excellent start to the season.