Three goals in the last five minutes turned the game on its head and earned bottom-club Partick Thistle a much-needed 3-1 win at Dundee.
Kane Hemmings had a goal ruled out for offside after six minutes and Paul McGowan brought a decent save from Scott Fox on the quarter hour as Dundee started brightly.
McGowan did open the scoring for the Dark Blues 10 minutes later with a first-time effort from 12 yards.
Thistle came close to an equaliser early in the second half when Kenny Miller played in Ryan Williamson but his shot was superbly saved by Jack Hamilton.
Gary Harkins sent a header against a post for the visitors and they levelled five minutes from time when Miller fired home from 12 yards.
It was 2-1 when Shea Gordon rolled the ball home and there was still time for substitute Lewis Mansell to clip the ball over the goalkeeper for a third.