Aberdeen secured European qualification as attacker Ryan Hedges ended three months of injury hell with a goal – just minutes after his introduction from the bench.
The Dons will now enter the Uefa Conference League at the second qualifying round on July 22 as they secured European qualification for an eighth straight season.
Aberdeen are also still in the hunt for a third placed finish as the gap was slashed to three points on Hibs who lost 1-0 to St Johnstone.
Aberdeen’s next game is against Hibs at Pittodrie on Wednesday May 12.
The Dons vital win also marked the welcome return of Hedges who came off the bench for his first game time since suffering an injury on February 2.
Hedges was on the pitch for only a few minutes before netting a superb goal.
Callum Hendry had already put the Reds a goal up.
There were three changes to the Aberdeen starting XI that crashed 3-0 to Dundee United in the Scottish Cup quarter final.
Connor McLennan, Jack MacKenzie and Dylan McGeouch came into the starting line-up with Matty Kennedy, Calvin Ramsay and Dean Campbell dropping to the bench.
On loan Oldham Athletic keeper Gary Woods retained his starting slot as No.1 Joe Lewis is still out with a rib injury.
There was a welcome return to the squad for Welsh international attacker Ryan Hedges who was named on the bench.
Initial fears were that Hedges’ season was over when he suffered a pectoral muscle during the 2-0 loss to Livingston at Pittodrie on February 2.
The injury required surgery and the initial prognosis was that Hedges would be out for the campaign.
There will be a sense of frustration that his return cannot help a bid for the Scottish Cup.
There were surprises on the right flank for the Dons with McLennan in at right-back with Jonny Hayes, recently utilized at left back, moving to wide left of an attacking midfield three.
Midway through the first half Hayes switched to his more regular left role with Kamberi stepping inside to a more central role in support of Hendry.
McGinn moved to wide right.
Aberdeen created the first opportunity in the 11th minute when Lewis Ferguson was allowed the time and space to shoot 25 yards out.
With no-one closing the midfielder down he fired in a curling effort that keeper Max Stryjek had to tip the bar with a one handed save.
Keeper Stryjek produced a superb save a moment later. Naill McGinn whipped in a delivery that found Callum Hendry and the striker’s header from the centre of the box produced a superb save at the near post.
Livingston threatened in the 19th minute when Devlin fired in a shot from the right after breaking into the box.
Keeper Woods parried the ball out and Jay Emmanuel-Thomas pounced but his low drive from 15 yards was blocked.
In the 28th minute Hayes raced onto a route one long ball hoisted up filed by Andy Considine.
Hayes held off a challenge from Jack Fitzwater to break into the box and get off a shot but it was straight at keeper Stryjek who easily saved.
Moments later McGinn crossed from the right byline to the back post and found Ferguson racing in unchecked into the penalty-area.
His 15 yard header was yet again straight at the keeper who comfortably collected.
In the 33rd minute Ferguson drove upfield before laying off a pass to McGinn 20 yards out.
McGinn attempted to curl an effort into the far corner and it flew just inches wide.
Aberdeen keeper Woods was called into action moments later when he blocked a powerful drive from Craig Sibbald.
Livingston should have taken the lead in the 39th minute when a short back pass from McLennan was intercepted by Matej Poplatnik who raced in on goal.
Woods came out to close the angle and Poplatnik fired across goal and wide.
He should have scored.
Half-time: Livingston 0 Aberdeen 0
Aberdeen went ahead in the 52nd minute when a cross McGinn picked out McLennan whose header was superbly pushed onto the underside of the bar by keeper Stryjek.
On loan St Johnstone striker HENDRY followed in and bundled the ball over the line.
It was Hendry’s third goal during his loan spell.
Hendry has made the biggest impact of the three loan strikers introduced on transfer deadline day in the winter window.
Kamberi (St Gallen) has netted just once in the Scottish Cup and Fraser Hornby (Stade de Reims) has yet to score.
In the 67th minute Jackson Longridge fired a 30 yard drive effort high and wide.
Hedges made a welcome return to the Dons after three months out with injury when coming on in the 70th minute for McGinn.
The returning HEDGES took just a few minutes to mark his return with a bang – and a goal in the 74th minute.
Kamberi hit the byline, pulled the ball back and Hedges unleashed a superb finish for his ninth goal of the season.
What a way to mark his return.
Livingston hit back with a superb goal when Jay EMMANUEL-THOMAS latched onto a cross from the left and unleashed a superb right footed volley beyond Woods.
A moment later a right footed drive by Kamberi from the centre of the penalty area was saved by keeper Stryjek.
Substitute Fraser Hornby had to come off late on injured with Matty Kennedy coming on.
Full-time: Livingston 1 Aberdeen 2
ABERDEEN: Gary Woods, Tommie Hoban, Andy Considine, Callum Hendry, Niall McGinn, Dylan McGeouch, Jonny Hayes, Connor McLennan, Lewis Ferguson, Florian Kamberi, Jack Mackenzi
Subs: Fraser Hornby (for Hendry 64), Ryan Hedges (for McGinn 70), Matty Kennedy (for Hornby 88)
Subs not used: Tom Ritchie, Ethan Ross, Dean Campbell, Mark Gallagher, Michael Ruth, Calvin Ramsay.
LIVINGSTON: Max Stryjek, Nicky Devlin, Jack Fitzwater, Jon Guthrie, Jackson Longridge, Craig Sibbald, Marvin Bartley, Scott Pittman, Matej Poplatnik, Jason Holt, Jay Emmanuel-Thomas.
Subs: Jaze Kabia (for Sibbald 66),
Subs not used: Gary Maley, Jack McMillan, Alan Lithgow, Alan Forrest, Djibril Diani, Efe Ambrose, Julien Serrano, Josh Mullin.
Referee: Grant Irvine.