Rangers goalkeeper Allan McGregor gifted Ross County two goals as teenager Matthew Wright netted an equaliser in the sixth minute of added time.
The 19-year-old County striker, who spent the first half of the season on loan with Highland League side Brora Rangers, scrambled home to earn a 3-3 Scottish Premiership draw.
Amad Diallo scored inside five minutes of his Rangers debut but the loan signing from Manchester United was off injured by the time the late drama unfolded.
Major errors from McGregor and Calvin Bassey gifted County two goals inside four minutes with Jordan White and Regan Charles-Cook taking advantage.
Diallo was again involved as James Tavernier equalised early in the second half and Connor Goldson headed home in the 72nd minute to put Rangers ahead but Wright had the final say after McGregor's second blunder.
Nigeria midfielder Joe Aribo was back in the Gers team after his return from the Africa Cup of Nations and he burst through the left channel before delivering a perfect pass to the back post where Diallo tapped home the opener from close range.
Diallo could eventually cost Manchester United almost double the initial £18.7million fee paid to Atalanta and the winger soon showed his talent with a brilliant piece of skill which sucked Jake Vokins into a heavy challenge and a yellow card.
County began to dominate territory and possession though and they got their rewards.
McGregor, who celebrates his 40th birthday on Monday, dropped Joseph Hungbo's 25th-minute cross after getting both hands on the ball and White lapped up the present.
The second County goal came after Rangers failed to deal with a long ball. Goldson's clearance went backwards, Borna Barisic headed to a County player and Bassey took a fresh-air swipe that put Charles-Cook through.
The winger stuck the ball through McGregor's legs to move top of the Premiership scoring charts with his 10th league goal of the season.
Rangers upped the tempo late in the half. Glen Kamara and Tavernier forced decent saves from Ashley Maynard-Brewer before the latter curled a free-kick just past the top corner.
The champions were level within four minutes of the restart. Diallo cut inside Vokins and fired a strike which Maynard-Brewer could only palm out. Ryan Kent got a foot to the rebound and the ball fell for Tavernier to finish from six yards.
Rangers maintained the pressure with Kamara getting on the ball and Aribo causing all sorts of problems while Diallo continued to look dangerous.
Diallo's shot spun just wide off the foot of Vokins before the new signing went off for Fashion Sakala after receiving treatment. He did not seem to be badly hurt.
Kemar Roofe came on for the ineffectual Cedric Itten but he miskicked from a good chance after another impressive run from Aribo.
The pressure on the County box finally paid off. Maynard-Brewer stopped Scott Arfield's low shot but the rebound bounced up into the path of Goldson, who headed in despite the goalkeeper's best efforts to stop the ball going over the line.
County had a brilliant chance to level moments later when Keith Watson got up to meet a corner from three yards out but the substitute glanced wide.
Roofe turned and shot off the post at the other end and Sakala could not take a chance to finish the game off.
County levelled after a scramble following a corner, with McGregor's body knocking the ball into the path of Wright when it looked like the goalkeeper could have collected with his hands. The forward slotted inside the near post on his fifth County appearance.