Livingston came from behind twice to climb back into the top six thanks to a 3-2 away victory over Kilmarnock.
The hosts took an early lead when Joe Wright powered a header home but the away side answered back just before the break thanks to a wonderful long-range effort from Bruce Anderson.
There was still time for Killie to retake the lead before the break - once again from a Wright header - but the Rugby Park side would shoot themselves in the foot in the second-half.
Or, more accurately, Chris Stokes would do so as the centre-back conceded a penalty, duly converted by Sean Kelly before turning the ball into his own net on 75 minutes to condemn his side to defeat.
Coming off the back of consecutive clashes against the Old Firm, Livi boss David Martindale elected to hand a first league start of the campaign to Bruce Anderson while Shamal George was back from injury having missed last weekend's visit of Celtic.
The keeper's first action was to pick the ball out of the net as Killie opened the scoring after just four minutes. Wright was able to rise the highest and direct his header from a Daniel Armstrong corner-kick into the bottom corner for his first goal in blue and white.
The Lions almost replied in similar fashion just after the quarter-hour mark but Ayo Obileye failed to replicate Wright as his header from Sean Kelly's corner went wide with the keeper a bystander while Joel Nouble flashed an effort wide after jinking past Ash Taylor on the left flank.
Defending set-plays is something the visitors have improved on this term after struggling on that front last season but there was little sign of that tonight as they were nearly caught out a second time when Liam Donnelly was unable to direct his header the right side of the woodwork for his liking on half an hour in.
Anderson was cutting a largely frustrated figure up front for Livi but he was presented with a great chance to level things up when Jack Fitzwater's inch-perfect ball over the top found the striker. A good first touch allowed him space between the defenders but Zach Hemming produced a smart save to deny the former Aberdeen man.
He wasn't to be denied moments later as he collected a loose ball 30 yards out, strode forward and unleased a fizzing strike into the bottom corner for a deserved equaliser.
Parity didn't last long, though, as moments after a looping header crashed back off the woodwork, Wright went one better and turned an Armstrong whipped free-kick back across goal and into the far corner to give the hosts a half-time lead.
Livi almost gifted Killie a third just two minutes into the second-half as Jackson Longridge had his kick charged down, leaving Innes Cameron in acres of space to bear down on goal. The full-back made amends with a last ditch block to ensure the strike fell harmlessly into George's arms.
The topsy-turvy affair would take another turn on 60 minutes as referee Colin Steven ruled that Chris Stokes handled inside the Killie box after Cristian Montano's cross was headed towards goal. Up stepped Kelly to roll the ball into the net with Hemming diving the wrong way.
That sparked a change in momentum with the West Lothian side going on to enjoy a period of dominance - and they were given a helping hand in making it count by the home side.
Great battling play and neat control down the left flank ultimately led to Montano's delivery into the box being inadvertently turned into his own net by Stokes.
Martindale's men were able to see out the remaining minutes without too much drama to seal a vital three points.
Kilmarnock: Hemming; Alebiosu, Wright, Taylor (Mayo 79), Stokes; Donnelly (Polworth 79), Power (Murray 85): Armstrong; McKenzie (Alston 66), Jones; Cameron (Shaw 79). Subs not used: Walker, Dorsett, McInroy, Doidge.
Goals: Wright (4, 45)
Livingston: George; Devlin, Obileye, Fitzwater, Longridge (Montano 56); St. Kelly (Omeonga 56), Pittman, Se. Kelly; Nouble, Anderson (Shinnie 83), Bahamboula (Holt 83). Subs not used: Hamilton, Konovalov, Goncalves
Goal: Anderson (39), Se. Kelly (61 pen), Stokes (og 75)