Craig Gordon was the Hearts hero, saving twice in a Scottish Cup penalty shootout win over St Mirren in Paisley.
Mikael Mandron gave the hosts a deserved lead during a fierce spell of first-half pressure, poking in from close range as Gordon parried a shot from Mark O'Hara.
Hearts forced extra time when late substitute Calem Nieuwenhof struck with his first touch.
Caolan Boyd-Munce saved St Mirren with a goal-line clearance from Elton Kabangu on 98 minutes before a drab period of extra-time.
Veteran Scotland international Gordon denied Oisin Smyth and James Scott from the spot, before Gerald Taylor missed for the visitors, but James Penrice held his nerve to send the Edinburgh side into the quarter-finals where they will host Dundee.
Gordon had been under pressure for long spells in the first half as Hearts struggled to deal with St Mirren's direct approach.
Toyosi Olusanya flicked a shot over the top and Jamie McCart needed to make a front post block after the forward skipped wide of Gordon to send in a dangerous cross.
Hearts did not pose much threat before the interval but Kabangu did have home goalkeeper Zach Hemmings at full-stretch to push away a powerful shot.
Olusanya and Killian Phillips threatened after the interval but the team from Edinburgh responded with Blair Spittal firing over and having an effort blocked.
Nieuwenhof, making his return from 11 months out injured, was the unlikely source of Hearts' equaliser, sweeping home from 10 yards just moments after coming off the bench.
With a flurry of substitutes and the pitch cutting up, the game grew scrappier the longer it went on, leaving Gordon to make the headlines late into the evening.