Srikar Bharat struck a match-winning six off the final delivery as the Royal Challengers Bangalore beat Indian Premier League leaders the Delhi Capitals on Friday.
Chasing a target of 164-5, it looked likely that Virat Kohli's men would fall short until a dramatic final over in Dubai.
With six runs needed off the final ball, Avesh Khan (0-31) bowled a wide to give Bharat one more chance, and his final full toss was powered over the ropes to give the Royal Challengers a seven-wicket win.
The Capitals started in commanding fashion after being put in to bat, Prithvi Shaw (48) and Shikhar Dhawan (43) combining for 88 until the latter was caught at mid-off.
Captain Rishabh Pant fell for just 10 runs shortly after Shaw sliced a shot straight to George Garton, with Shreyas Iyer (18) and Shimron Hetmyer (29) helping to push the target score into tricky territory.
When Devdutt Padikkal went for a golden duck and Kohli followed after posting just four runs, the Royal Challengers' task began to look firmly beyond their means.
That was until the intervention of Glenn Maxwell (51) and man-of-the-match Bharat. An unbeaten 78 off just 52 deliveries, aided by some lacklustre work in the field, kept the improbable in sight even after AB de Villiers' promising knock of 26 was ended before the midway point of the innings.
Maxwell reached his half-century to start the final over before Bharat's heroics sparked wild celebrations.
More Capitals gains for Kohli
The Capitals were on a run of just one defeat in seven IPL matches but came unstuck against arguably their least-favourite opponents.
The Royal Challengers have won 16 of 25 completed matches in the competition against Delhi – against no side have they won more.
It was a frustrating way for the Capitals to head into Sunday's first qualifier with the second-place Chennai Super Kings, while the Royal Challengers will be buoyed ahead of their eliminator with the Kolkata Knight Riders.
Two grand batters
Maxwell's 51, which included eight fours, saw him become the eighth Australian to reach 2,000 runs in the IPL.
Dhawan also surpassed the 2,000-run mark, a feat only achieved previously by three players for the Capitals in the competition.