Derry City boss Ruaidhri Higgins says it was a "bad night" for his team as Finn Harps fought back to clinch a 2-1 victory in the Brandywell derby.
James Akintunde put City in front and Karl O'Sullivan levelled before Adam Foley's late winner.
"It's really tough to take - it wasn't to be and it was a bad night for us," said Higgins, who suffered his first defeat in charge.
"We have a lot of young players and they will learn from it."
The Donegal visitors had picked up just one point from their last 12 and failed to find the net in the winless run, but they rediscovered their scoring touch at just the right time on Monday night.
It looked like being another frustrating game in front of goal as Barry McNamee and O'Sullivan saw early efforts go wide before City keeper Nathan Gartside saved from Tunde Owolabi's shot.
Derry's first decent attack yielded a 17th-minute goal with Will Patching picking out the run of Akintunde, who cut inside before bending the ball round Mark McGinley and into the Harps goal.
McGinley kept out a long-range Patching striker before Will Seymore sent a blistering 35-yard shot crashing off the City crossbar.
Patching also found the bar with a mishit cross early in the second half before O'Sullivan levelled on 52 minutes - a free-kick was cleared out to the midfielder and his powerful drive deflected off Cameron McJannett before flying into the net.
A thrilling climax to the game saw Jack Malone's low shot hit the inside of the Harps post with Akintunde blasting the rebound over.
McNamee's throughball sent Foley clear and the midfielder slotted underneath Gartside for the 89th-minute winner.
City defender Eoin Toal headed off the woodwork in injury-time as the hosts came so close again but Harps held on for the three points.
Harps stay fourth with Derry in eighth going into their home encounter against Longford Town on Friday night.