Derry suffered a narrow Premier Division defeat by Bohemians in their final home game of the season.
All five goals came in a thrilling opening 35 minutes, with Ciaran O'Connor levelling seconds after Ismahil Akinade's opener for Bohs.
Akinade headed in to make it 2-1 and Barry McNamee fired home an equaliser before Jake Kelly hit the winner.
Derry had already secured their top-flight status but this was a first defeat for caretaker boss Paul Hegarty.
Hegarty, who guided the Candystripes to safety after Peter Hutton's departure, has still to decide on whether to take the job on a permanent basis.
The dangerous Akinade rolled the ball through the legs of keeper Gerard Doherty to put the Dubliners ahead in the second minute.
O'Connor's backpost header from a Mark Timlin cross quickly followed but Akinade's close-range finish from a corner restored the visitor's advantage.
A composed strike from McNamee made it level again before Kelly capitalised on poor defending to slot into the corner.
Derry pressed in the second half but were repeatedly denied by keeper Dean Delaney as they fell to a first loss in five games.