Livingston exited the Scottish Cup in agonising fashion as they went down on penalties following a spirited performance away to Hearts following a 0-0 draw.
Penalty misses from Cristian Montano and Ayo Obileye proved crucial after both sides had been perfect with their first three in the shoot-out.
It was a brilliant defensive display over the course of the 120 minutes from the Lions - but it was the visitors who went closest to finding a crucial goal as Scott Pittman hit the woodwork in the second half.
Livingston manager David Martindale elected for a change in formation that saw Joel Nouble and Bruce Anderson partnered up front for the first time.
The Lions would pass up a brilliant opportunity to take the lead on four minutes when Nicky Devlin played in Anderson who raced behind the Hearts backline. The former Aberdeen man elected to fire at goal when a quick look up would have seen him spot the unmarked Nouble at the back post.
Despite that, Hearts were enjoying plenty of attacking possession in the early stages with the Livi defence flinging everything at it to prevent them going a goal down. James Penrice produced a terrific last ditch tackle to prevent Andy Halliday from firing at goal while Max Stryjek was called into action as he got down at his near post to thwart a Barrie McKay angled drive.
The Polish stopper would have to be alert once more on 17 minutes when a quick counter from Hearts led to some neat footwork from Ellis Simms inside the box to take him away from Jack Fitzwater but Stryjek pushed the effort wide.
Hearts would pass up a glorious chance just after the half hour mark when McKay played Alex Cochrane in down the left flank in acres of space - only for Devlin to make a remarkable recovery and block the effort on goal.
At howling wind and pouring rain started to engulf Tynecastle, the contest seemed to become more of a war of attrition than anything else as both sides struggled to get into a rhythm.
Robbie Neilson introduced top scorer Liam Boyce and Gary Mackay-Steven on the hour mark in a bid to spark some energy into their attack but it was Livi who would have the first great chance of the second half - and that didn't arrive until the 73rd minute as James Penrice's cutback found Scott Pittman with the midfielder's effort deflecting onto the post.
Hearts promptly went straight up the other end and forced Stryjek into his first save after the break when the ball fell kindly to Simms but it was too tight an angle to really threaten an opener with the keeper saving at his near post.
He would have to be at his best three minutes from time to get his fingertips on a John Souttar header to ensure the game headed into extra-time.
He would be at it again midway through the first additional 15 minutes when he instinctively palmed away a Peter Haring header as the hosts were having the better of the play while Boyce skied a strike from 18 yards after brilliant build-up play but neither side could find the breakthrough.
And so to penalties. Andrew Shinnie, Sean Kelly and Jason Holt all netted for the Lions, with John Souttar, Peter Haring, and Ben Woodburn replying for the Jambos.
Montano's strike clipped the outside of the post - allowing Simms to fire his side in front with Craig Gordon then saving from Obileye to ensure Livi's bid for a first quarter-final berth since 2005 continues into another year.
Hearts: Gordon; Sibbick, Souttar, Kingsley; Smith (Atkinson 71), Devlin, Baningime (Haring 71), Cochrane (Mackay-Steven 60); McKay (Woodburn 105), Simms, Halliday (Boyce 60). Subs not used: Stewart, McEneff, Moore, Ginnelly, Pollock.
Livingston: Stryjek; Devlin, Obileye, Fitzwater; Forrest (Bailey 100), Omeonga (Kelly 119), Holt, Pittman (McMillan 119), Penrice; Nouble (Shinnie 94), Anderson (Montano 63). Subs not used: Maley, Longridge, Sibbald, Boyes, Lewis, Chukwuemeka.