The Highlanders have snuck into the Super Rugby Pacific playoffs, losing 31-30 to Melbourne Rebels in their final match of the regular season.
Even in defeat, a losing bonus point gave the Highlanders exactly what they needed to sneak past Western Force on points differential, and take the eighth and final playoff spot on the Super Rugby ladder.
The result sets the Highlanders up to face the table-topping Blues, with the quarter-final to be played at Auckland's Eden Park next week.
With a penalty on the fulltime siren, the Rebels could have pushed for a try that would have knocked the Highlanders out, but chose to take just their fourth win of the season by a solitary point at AAMI Park.
In a fast start, the Highlanders opened the scoring in the first three minutes, as Marty Banks and Thomas Umaga-Jensen combined to put winger Rory van Vugt away for his first Super Rugby try.
The Rebels had a try ruled out, as fullback Nick Jooste went over, before video replays showed a knock-on from halfback James Tuttle in the build-up.
The Highlanders rubbed salt into that wound, when Josh Dickson smashed his way over from close range to push the score out to 12-0.
Hooker Jordan Uelese gave the Rebels their first points from a lineout drive, before a Banks penalty pushed the Highlanders into an eight-point lead.
That advantage became a one-point game on the half-hour mark, as an Aaron Smith pass was intercepted by Rebels winger Glen Vaihu, who raced away for a try that closed the gap to 15-14 in the Highlanders' favour.
Another penalty to Banks extended the Highlanders lead to 18-14 at halftime, before the Rebels mounted a comeback in a see-saw second spell.
Denied a try in the first half, Jooste put his name onto the scoresheet in the second and gave the Rebels the lead for the first time, holding off the Highlanders defence to score in the corner.
Another Rebels try, this time to winger Lukas Ripley - who showed incredible composure to hang on to the ball after a fumble to dot down in the corner - left the Highlanders staring at an early exit from the competition, down 26-18 with 20 minutes to play.
But the injection of Folau Fakatava ultimately proved the decisive factor for the Highlanders. The livewire No.9 re-ignited his side's hopes with a try and sparked another that saw the Highlanders move 30-26 in front.
With minutes left on the clock, the Rebels took the lead again, this time through replacement back Young Tonumaipea, who latched onto a kick from Joe Powell and ran in for the final score of the game.
The Highlanders closed out a nervy final few moments, but ultimately did enough to ensure another week in the competition, and will now head back to New Zealand to try and end a Blues winning run currently at 13 matches.
The result also ensures all five New Zealand sides are represented in the playoffs, with the Crusaders, Chiefs and Hurricanes all advancing.
Highlanders 30 (Van Vugt, Dickson, Fakatava, Paea tries; Banks, Koroi conversions; Banks 2 penalties) Rebels 31 (Uelese, Vaihu, Jooste, Ripley. Tonumaipea tries; To'omua 3 conversions)
Join us next weekend for live updates of the Super Rugby Pacific playoffs