Livingston battled through to the Ladbrokes Premiership play-off final with a 4-3 aggregate win over Dundee United, following a 1-1 draw at the Tony Macaroni Arena.
The Lions led 3-2 from a thrilling semi-final first-leg at Tannadice and defender Alan Lithgow stretched that advantage with a close-range header after only six minutes.
Midfielder Scott Fraser drew United level in the 21st minute with a fine finish to give Csaba Laszlo's side hope of a comeback but they could not get any closer during a frantic and at times feisty 90 minutes.
David Hopkin's men will likely play either Ross County or Partick Thistle - Hamilton are all but safe as they are three points and 13 goals better off than second-bottom Jags with one game remaining - with their respective fates being decided on Saturday.
The first-leg of the final is on Thursday with the return game on the following Sunday.
After such an encouraging result on Monday night, Livi showed only one change with midfielder Keaghan Jacobs in for Scott Robinson, who dropped to the bench.
United were without captain and midfielder Willo Flood, who was sent off in the first leg, with Grant Gillespie taking over and defender Mark Durnan coming in for Jamie Robson.
With fans still streaming into the ground the home side forged ahead.
A searching free-kick by Jacobs was headed across goal by Jackson Longridge and the on-rushing Lithgow had the easiest of tasks heading it over the line.
The Taysiders' response was impressively robust and they deservedly equalised when veteran striker Scott McDonald set up Fraser who twisted and turned inside the box before firing the ball low past keeper Neil Alexander and in off the far post.
United edged the rest of the half and at the interval many of their big support moved behind the goal they were shooting into in the second half.
However, the first of the action came at the other end when Scott Pittman beat United keeper Harry Lewis with a drive which rattled the post, the Tannadice goal surviving with some desperate defending.
United looked more proficient in attack and the West Lothian rearguard were asked further questions which were answered, occasionally at a stretch.
Livingston edged forward with increasing confidence as time began to run away from United. In the 68th minute, from a Lithgow throw-in into the box, Tannadice defender Bilel Mohsni appeared to handle in his attempt to clear but referee Don Robertson ignored the penalty claims.
At the other end Billy King forced a decent save from Alexander with an effort from the edge of the box and the former Rangers keeper made a better save from McDonald's close-range shot, after Livi substitute Robinson had crashed a shot off the bar.
However, the visitors ran out of belief and ultimately time, leaving Livingston one step closer to a top-flight return.
Premiership News
Kemar Roofe: Rangers' championship win still hasn't sunk in
Striker Kemar Roofe says it still hasn't hit him that his Rangers side are Scottish Premiership champions.
Gerrard will go on to 'far bigger things' than the Scottish title
Julien Laurens praises "magnificent" Steven Gerrard in leading Rangers to their 55th Scottish league title.
Steven Gerrard steers Rangers to first Scottish title in 10 years
Rangers have won the Scottish Premier League for the first time in 10 years after Celtic failed to beat Dundee United on Sunday.
Gerrard not surprised by Lennon's Celtic resignation
Rangers manager Steve Gerrard sends well-wishes to Neil Lennon after he recently left Celtic.
Lennon resigns as Celtic boss; Hoops trail Gerrard's Rangers by 18 points
Celtic manager Neil Lennon has stepped down after a dismal campaign that has left the Scottish Premiership club 18 points behind leaders Rangers.
Rangers remain unbeaten but drop points after late equalizer
Hamilton salvage a 1-1 draw with an added time equalizer against Rangers in the Scottish Premiership.