Annan midfielder Kenneth Mackay scored in stoppage time as the Galabankies came from behind to beat Elgin 3-2.
City broke the deadlock in the fourth minute when Craig Gunn pounced from close range.
The hosts doubled their lead in the 15th minute when Brian Cameron found the back of Kenny Arthur's net from the middle of the box.
Peter Weatherson pulled one back after 33 minutes when he nodded in Keiran Brannan's cross before Josh Todd's low drive made it 2-2 midway through the second half.
Just as the game was drawing to a close, Mackay rifled the ball into the corner of Raymond Jellema's goal to complete his side's comeback and end Elgin's eight-match unbeaten run.