Substitute Lee Erwin netted a late penalty as Kilmarnock edged out Ross County 1-0 to reach the fifth round of the William Hill Scottish Cup.
The game looked to be heading for a goalless draw and a Dingwall replay until Tim Chow was ruled to have pushed Rory McKenzie as the Kilmarnock midfielder brought down a ball over the top.
Referee Bobby Madden took his time before pointing to the spot and sending Chow off amid heated protests from the visitors.
Erwin slotted the 88th-minute spot-kick into the bottom corner to earn the hosts the win after County goalkeeper Aaron McCarey was denied a sensational equaliser when Jamie MacDonald saved his header in the final seconds.
The final few minutes proved unexpectedly dramatic after a previously dull encounter.
County handed a start to Inih Effiong 24 hours after the 6ft 3in striker signed from Woking while St Johnstone target McKenzie started for the hosts after Youssouf Mulumbu failed to overcome what Steve Clarke described as a ``niggling injury''.
There looked a more serious problem for County midfielder Jamie Lindsay in the early stages as he landed heavily and had to be replaced by Chow.
County's Ross Draper had the first chance but could not get enough power in his header and Eamonn Brophy soon produced the best moment of the half when he turned inside his man 22 yards out and unleashed a powerful strike which McCarey tipped over.
McKenzie came closer when he dug out a dangerous cross from near the byline which bounced off the inside of the far post before being cleared.
Effiong looked a physical handful at times and he tried his luck with an ambitious overhead kick which sailed over, before MacDonald smothered as he ran on to a through ball.
The start of the second half was even less eventful than the first but County had a good chance 20 minutes in when Kenny van der Weg's deep cross found fellow full-back Jason Naismith. The former St Mirren player looped a header just wide.
Steve Clarke brought on Lee Erwin and Greg Kiltie in place of Kris Boyd and Brophy with 17 minutes and the former was on hand to net his second Killie goal before McCarey saw a header held on the line following a stoppage-time corner, with Madden ignoring his claims that the ball had gone over the line.
Scottish Cup News
Celtic win Scottish Cup on pens after thriller vs. Hearts
Celtic complete a fourth consecutive domestic treble by winning the delayed Scottish Cup final vs. Hearts.
Celtic win fourth consecutive Treble in dramatic shootout Scottish Cup final win vs. Hearts
Celtic completed a historic fourth consecutive domestic Treble after overcoming Hearts on penalties in the Scottish Cup final.
Celtic reach Scottish Cup final for fourth year in a row
Celtic defeat Aberdeen 2-0 to set up a cup final tie vs. Hearts. Watch the Scottish Cup on ESPN+.
Celtic supporter jailed for 10 months after punching three police horses
A Celtic fan has been jailed for 10 months after punching three police horses before a Scottish Cup match.
Celtic clinch 'Triple Treble' with Scottish Cup win
Celtic wrapped up a domestic Treble for an unprecedented third straight season after beating Hearts 2-1 in the Scottish Cup final on Saturday.
Timothy Weah scores on Celtic debut to seal Scottish Cup progress
United States international Timothy Weah scored on his debut for Celtic as the Scottish champions beat Airdrieonians 3-0.