Cork 3-13 Derry 3-11
Cork made it five wins from five in Division Three of the Allianz Football League, but were almost caught by a late Derry fightback at Páirc Uí Chaoimh.
Cork led by four after playing with the wind before half-time, 1-5 to 0-4, and eased clear of the Oak Leaf challenge in the second period, aided by two goals from John O'Rourke.
When sub Michael Hurley kicked a point in the 63rd minute after his introduction, the Rebels were 3-12 to 1-8 in front.
However, Derry didn't throw in the towel and Shane McGuigan's fourth point was followed by a goal from Emmett Bradley, just after Cork goalkeeper Anthony Casey had denied sub Declan Cassidy.
Though another McGuigan free was answered by a Damien Gore point and Derry needed a goal-line clearance from Padraig McGrogan to deny Ian Maguire, the deficit was down to just three as Niall Keenan set up Patrick Kearney for a goal in the second of four minutes of injury time.
McGuigan cut the gap further to bring his tally to six and Derry had a last chance to snatch something as Carlus McWilliams sent a ball goalwards but Cork's Mattie Taylor came away with possession and the Rebels held out.
They now have 10 points and are almost sure of promotion while Derry, on five, will need to beat Longford and Offaly.
It was 1-3 to 0-1 for the hosts when Gore netted on 18 minutes.
Goalkeeper Odhrán Lynch (45), Bradley and McWilliams helped Derry to come to within four by the break, but Cork looked to have pulled clear as sub Cathail O'Mahony made a good contribution with points and O'Rourke fired in two goals.
They had to endure a shaky finish but had done enough.
Scorers: Cork: J O'Rourke 2-2 (1m), D Gore 1-3 (1m), C O'Mahony 0-4 (2f), L Connolly 0-2 (1f), E McSweeney, M Hurley 0-1 each.
Derry: S McGuigan 0-6f, E Bradley, N Loughlin (1f) 1-1 each, P Kearney 1-0, P Cassidy, C McWilliams (m), O Lynch (45) 0-1 each.