Derry City survived a penalty and a disallowed goal to claim a 1-0 win over St Patrick's Athletic at Richmond Park.
Mark Farren blew the title race wide open again on a night when boss Stephen Kenny confirmed his move to SPL side Dunfermline Athletic at the end of the league season.
Kenny will remain in charge of Derry until after next Friday’s final league game at home to Cork City.
Kenny will then leave immediately to take charge of Dunfermline against Dundee United at East End Park the following day.
Kenny, however, will return to take charge of Derry for the FAI Carlsberg Cup final against St. Pat’s at Lansdowne Road on December 3.
David Forde brilliantly saved Michael Foley’s 13th minute penalty after Clive Delaney had pulled down Colm Foley.
Derry got their winner on 61 minutes when substitute Paddy McCourt got to the end line to cross and Farren tapped home.
Colm Foley headed home a Keith Fahey free-kick in stoppage for what appeared an equaliser, but referee Richie Winter ruled it out for pushing.
St Patrick’s Athletic: Ryan; S. Quigley, C. Foley, Brennan (Fahey, 28), Frost; M. Quigley (Grogan, 84), Murphy, M. Foley, O’Connor; Rooney, Molloy (Armstrong 84).
Derry City: Forde; McCallion, Hutton, Delaney, Hargan (McCourt 58); Deery, Higgins, Molloy, Brennan; Beckett (Martyn 90), Farren (McGlynn 87).
Referee: Richie Winter (Dublin).