Ross County punished Rangers’ sloppiness and opened the door for Celtic to cut the gap at the top of the Scottish Premiership with a dramatic 96th-minute equaliser in Dingwall.
Matthew Wright popped up to stun the league leaders, who had led through Amad Diallo early on.
Jordan White levelled after a mistake by goalkeeper Allan McGregor and Regan Charles-Cook put County in front.
Rangers’ James Tavernier then Connor Goldson netted before Wright struck.
The Ibrox side go five points clear before second-placed Celtic face Dundee United later.
And two wins in a row would take Ange Postecoglou’s side top of the table, with Rangers visiting Celtic Park on Wednesday.
The visitors’ start was direct and rewarded. Cedric Itten’s flicked pass released Joe Aribo, back from international duty with Nigeria, and he laid on a simple finish for Diallo on the right.
If the visiting crowd’s celebrations were a warm welcome to Scottish football, the on-loan Manchester United player was about to get a rude one. Diallo tried to evade Jake Vokins and was cynically taken out, prompting a yellow card for the full-back.
Ryan Kent and Aribo combined to set up Scott Arfield for a shot which Ashley Maynard-Brewer blocked, and Rangers soon found themselves behind.
McGregor fumbled a Joseph Hungbo cross and White was on hand to knock in from two yards.
And the home fans were cheering again when White’s nodded pass was missed by Calvin Bassey’s attempted clearance and Charles-Cook calmly slotted beyond McGregor to become the league’s top scorer with 10.
Rangers’ initial response was laboured; Glen Kamara, Tavernier and Arfield unable to properly test Maynard-Brewer and Tavernier’s free-kick flying wide.
But the Ibrox side’s fortunes changed early in the second period and Diallo was once again involved. The wide man cut inside and drew a save from Maynard-Brewer, with Kent hitting the rebound into the path of Tavernier to score.
Aribo’s skill and strength in the penalty area set up chances for Itten and Arfield but both were repelled by desperate County defending.
Diallo flashed a deflected shot wide moments before being replaced by Fashion Sakala, with Kemar Roofe having taken over from Itten.
And Rangers’ pressure told when Arfield’s shot was blocked high up into the air by the feet of Maynard-Brewer and Goldson headed in the rebound.
County could and should have levelled from a corner, Vokins’ replacement Keith Watson heading Hungbo’s delivery wide.
Roofe rattled the post and Sakala was denied on the break by Maynard-Brewer in a continually frantic contest. The keeper required treatment on a nosebleed after coming into collision with a team-mate in the aftermath of the second chance.
That stoppage contributed to seven added minutes and it was from a corner the hosts got level. McGregor did not deal with Watson’s shot in a crowded six-yard box and Wright, who had come on for White, buried his opening for a first senior goal.
Man of the match – Joe Aribo
What they said
Ross County maanger Malky Mackay: “We kept going until the very end. We know that we can score. I asked them to stay calm out of possession. I always we knew we’d create chances.
“Rangers are always going to be a good team, they’re always going to create chances. I’m delighted for Matthew Wright. It’s what he does – he scores goals.”
Rangers manager Giovanni van Bronckhorst told Sky Sports: “It’s very disappointing. We give two goals to Ross County. That made it really difficult for us. The reaction we had in the second half was really good.
“We had some chances to kill the game and make the fourth and decisive goal. In the end in extra-time, we were too sloppy. We give the ball away, we give a corner away. It’s not something I’m used to seeing – so many goals against us in this manner.”
What we learned
Ross County had netted twice in their previous two meetings with Rangers this season but conceded four in both matches.
The difference on this occasion was never falling more than a goal behind and retaining hope until late in the match.
The impact of Diallo and return of Aribo certainly gives Rangers encouragement going forward before Wednesday’s derby with Celtic.
But more pertinent will be addressing the defensive frailties that ultimately cost them points.
Ross County are at home again on Tuesday evening against Aberdeen (19:45 GMT), with Rangers visiting Celtic Park the following night (19:45)
5BaldwinBooked at 14mins
3VokinsBooked at 7minsSubstituted forWatsonat 65′minutes
6PatonSubstituted forSamuelat 57′minutesBooked at 70mins
8CallachanSubstituted forBurroughsat 83′minutes
26WhiteSubstituted forWrightat 83′minutes
37ArfieldSubstituted forLundstramat 90′minutes
9DialloSubstituted forSakalaat 66′minutes
11IttenSubstituted forRoofeat 59′minutes
Match ends, Ross County 3, Rangers 3.
Second Half ends, Ross County 3, Rangers 3.
Goal! Ross County 3, Rangers 3. Matthew Wright (Ross County) left footed shot from very close range to the bottom right corner following a corner.
Attempt saved. Keith Watson (Ross County) right footed shot from the centre of the box is saved in the centre of the goal. Assisted by Jack Baldwin.
Corner, Ross County. Conceded by James Tavernier.
Foul by Joe Ayodele-Aribo (Rangers).
Jack Baldwin (Ross County) wins a free kick in the defensive half.
Attempt missed. Joseph Hungbo (Ross County) left footed shot from outside the box is high and wide to the left. Assisted by Jordan Tillson.
Foul by John Lundstram (Rangers).
Jordan Tillson (Ross County) wins a free kick on the right wing.
Substitution, Rangers. John Lundstram replaces Scott Arfield.
Substitution, Ross County. Jack Burroughs replaces Ross Callachan.
Substitution, Ross County. Matthew Wright replaces Jordan White.
Attempt saved. Fashion Sakala (Rangers) right footed shot from the centre of the box is saved in the bottom left corner. Assisted by Ryan Kent.
Foul by Kemar Roofe (Rangers).
Regan Charles-Cook (Ross County) wins a free kick on the left wing.
Kemar Roofe (Rangers) hits the left post with a left footed shot from the centre of the box. Assisted by Scott Arfield.
Attempt missed. Keith Watson (Ross County) header from very close range misses to the left. Assisted by Joseph Hungbo with a cross following a corner.
Corner, Ross County. Conceded by Borna Barisic.
Goal! Ross County 2, Rangers 3. Connor Goldson (Rangers) header from the right side of the six yard box to the bottom right corner following a corner.