George Harmon's 86th-minute strike gave "bare bones" Ross County their third win in four Scottish Premiership games as they beat Kilmarnock at Rugby Park.
Just a few weeks ago, Don Cowie's side were down at the bottom with St Johnstone, but they are now 10 points clear of 12th place after their fine run lifted them clear.
Despite having seven players missing with injury, the visitors had the better of it in the first half with only a fine flying save from Robby McCrorie denying County captain Connor Randall when he curled one towards the top corner.
The second-half was more of a non-event until Noah Chilvers picked out an unmarked Harmon in the box, where the left-back swept home to send the travelling fans - who had made the 400-mile round trip - into raptures.
Kilmarnock did have spells where they kept County pinned back in their own box, but Jordan Amissah in the visiting goal had very little to do throughout.
"We were in a really poor run away from home," Cowie said. "It was about us coming together, the staff and the players, to correct that. We've done it very well.
"It gives us belief and confidence. We know what we've got in the group. We're at the bare bones - we've got seven players out injured - but we've rallied together."
County now rise up to ninth, leapfrogging Kilmarnock who drop to 10th.