Ropey Rangers survived a Scottish Cup scare to beat Partick Thistle 3-2 but the fifth-round tie threw up a hugely controversial incident which saw both sides grab a goal each.
Jags captain Kevin Holt gave the Championship side the interval lead with a penalty after 35 minutes after a VAR check and Croatia striker Antonio Colak, who had been penalised for handball for the spot-kick, levelled with a header five minutes after the restart.
Jags goalkeeper Jamie Sneddon saved a poor James Tavernier penalty before the real drama came.
After Rangers had put the ball out for Malik Tillman to receive treatment, Holt looked to launch a long ball from a throw-in back into the Gers half but Tillman robbed him and ran through to round the goalkeeper and put the ball in the net, sparking a melee with players from both sides and the on-loan Bayern Munich player on the ground.
Amid the confusion, Rangers boss Michael Beale instructed his players to allow Scott Tiffoney to run up the pitch and equalise but with four minutes of normal time remaining Connor McAvoy looked like he headed into his own net under pressure from James Sands to book the Gers a place in the last eight but the debate will continue.
With Rangers in such good form, it had promised to be a relatively straightforward afternoon.
Aside from the return of Colak, midfielder Nicolas Raskin was handed his first start since signing from Standard Liege with Ianis Hagi starting for the first time in over a year after recovering from a knee injury, with veteran goalkeeper Allan McGregor, Sands, Glen Kamara and Tillman reinstated while Kemar Roofe had recovered from a shoulder injury to take his place on the bench.
Thistle had good experience in their side in the shape of Stuart Bannigan, Brian Graham, Aaron Muirhead and former Ger Lee Hodson and their 2,500 fans added greatly to the atmosphere.
The Maryhill men soon found themselves under pressure but for all their possession the Govan side could not fashion a clear-cut chance.
Hagi headed a Todd Cantwell cross past the post from 14 yards in the 26th minute before the match took an unexpected twist.
McGregor made two fine saves, one from a Kyle Turner free-kick from outside the penalty area and then from Tiffoney’s powerful drive from 14 yards, before the visitors took a shock lead after a header from Holt inside the box struck the arm of nearby Colak.
Referee David Munro was asked to check the monitor by Steven Kirkland, in charge of VAR, and he pointed to the spot with Holt confidently sending McGregor the wrong way with his spot-kick.
As Jags fans celebrated, the Rangers supporters growled their frustration and Beale took action at the break.
Ryan Kent and Roofe replaced Hagi and Cantwell and within four minutes Roofe had raced clear of the Thistle defence only to fire wide of the target.
However, a minute later, Colak headed in a Raskin cross at the back post for his 15th goal of the season and waves of relief went around Ibrox outwith the yellow and red section.
Moments later, Sneddon parried a drive from Colak and it looked like Rangers had found their rhythm although Graham’s speculative effort from 35 yards evaded McGregor but also the crossbar.
When Bannigan tangled legs with Tillman inside the box referee Munro pointed to the spot and after a VAR check, Sneddon blocked a poor effort from Gers skipper Tavernier and Thistle retained hope.
Then came the incredible controversy with Tillman putting Rangers ahead before Tiffoney levelled to the amazement and bemusement of many in the crowd.
The match looked like it could go to extra-time but from a Borna Barisic corner the ball ended in the Thistle net, helped in by McAvoy it seemed with Sands in attendance, a scrappy goal to settle a remarkable match.