Shane van Gisbergen passed Scott McLaughlin with two corners remaining to win the opening leg of the Coates Hire Newcastle 500, to move within two points in the Supercars Championship.
The New Zealanders started the 95-lap race split by 14 points, and McLaughlin's advantage looked set to grow until the closing stages.
McLaughlin led the second half as van Gisbergen recovered from an extra mid-race pitstop to get back to second.
In the end, the extra stop under Safety Car conditions that dropped van Gisbergen to eighth paid off handsomely.
It ensured he had enough fuel to push to the line while McLaughlin had to conserve, the gap coming down from six seconds with 12 laps remaining.
Van Gisbergen's Red Bull Holden Racing Team Commodore ranged right up behind and eventually made a pass for the lead at Turn 11 on the final lap.
McLaughlin limped across the line 3.7704 seconds behind, but still comfortably ahead of third-placed David Reynolds.
With the results, what was set to become a 26-point advantage for McLaughlin falls to two, with only Sunday's final race of the year remaining.
“I don’t have much voice, there were so many words coming out of my mouth then, that was awesome,” van Gisbergen said.
“What a race. I could see Scotty was really charging. It was awesome, just two teams fighting hard.
“They obviously made a risky call to get all their fuel in, they did well there… I thought it was all over.
“I was seeing about four Datsuns (Nissans) in front and they’re the worst cars to pass, but I knew they would have to pit.
“It’s winner takes all tomorrow. It’s awesome. I’m really enjoying the battle.”
Jamie Whincup finished fourth despite nosing the wall in a clash with Fabian Coulthard, who later crashed heavily at Turn 1.
Whincup got the jump off the line to lead polesitter van Gisbergen, Coulthard and McLaughlin for the first lap.
That order changed significantly on the second, Whincup letting van Gisbergen past on the run to Turn 2, Coulthard doing the same with McLaughlin at Turn 11.
Van Gisbergen eased away from his team-mate at the front, Whincup falling to five seconds behind by lap 11 but keeping McLaughlin at bay.
Whincup pitted on lap 17, which left McLaughlin trailing his title rival by 5.8s as Whincup emerged behind the earlier-stopping Coulthard, Reynolds and Craig Lowndes.
He had picked off Lowndes and Reynolds by lap 23, when he tried to pass Coulthard through Turns 11 and 12.
Hung out on the outside coming onto the front straight, Whincup was forced wide and into the tyre barrier.
The gap at the front had stabilised by the time McLaughlin pitted on lap 24, van Gisbergen visiting pitlane for the first time one lap later.
Based on different fuel fills, van Gisbergen emerged with McLaughlin right on his bumper.
He withstood that pressure until the complexion of the race changed significantly on lap 41, when Coulthard lost the rear of his Shell Ford and crashed at Turn 1.
That brought out the Safety Car, and van Gisbergen and Shell V-Power Racing's McLaughlin in for their second stops.
Van Gisbergen and third-placed Reynolds were then in the next time around as well to top up on fuel in order to meet minimum fill requirements.
When racing resumed on lap 48, McLaughlin was second to the out-of-sequence Lee Holdsworth while van Gisbergen and Reynolds were seventh and eighth.
McLaughlin then led and built an advantage nearing 10 seconds over van Gisbergen, who was gradually picking up places.
With 30 laps remaining, McLaughlin led Scott Pye by 1.5s and van Gisbergen by 9.3s, as Reynolds lost touch.
Pye pitted with 20 laps to go, leaving McLaughlin holding a 6.9s lead over van Gisbergen, both teams trying to get to the end on fuel.
That came down to less than three seconds with two laps remaining, with McLaughlin then implored to save fuel over the radio.
Van Gisbergen was reassured he had enough to push to the end and he did, ranging right behind McLaughlin on the final lap.
He made a move into Turn 11, as McLaughlin hit empty, to take an eighth win of the campaign.
The pair will now start Sunday's race separated by only two points.
“I didn’t actually think we were that close,” McLaughlin said of the fuel situation.
“I thought we were pretty good there for a while and then it started to get a bit more intense with the call on the fuel.
“I was minimising [rev] blips and all that stuff, but sometimes you just don’t have another. We’ll debrief tonight and come back stronger tomorrow.
“But our car was really strong. If I pull my finger out and we qualify a bit better, we’ll be right.”
Reynolds eventually finished 10.8s behind van Gisbergen, acknowledging he didn't have the speed to stay with him on the run home.
Stewards took no further action on the Whincup/Coulthard clash.
Despite having to reverse out of the Turn 12 wall, Whincup got back to finish fourth.
Pye finished fifth after his extra pitstop, ahead of Mark Winterbottom, James Courtney and Heimgartner - Winterbottom and Heimgartner having started 22nd and 26th respectively.
Cameron Waters crossed the line in ninth, but fell to 14th with a 15-second penalty for a late, Turn 2 clash with Will Davison, who finished 16th.
That elevated Nissan pair Rick Kelly and Simona De Silvestro to ninth and 10th, the latter result a career-best in Supercars for the Swiss driver.
Anton De Pasquale was 11th and the top rookie, ahead of Holdsworth.
Having run in the top five early, Holdsworth served a drive-through penalty for the lap 48 restart, in which he got back up to pace while yellow flags were still being withdrawn.
Another breakout result went to rookie Todd Hazelwood in 13th for Bigmate Racing.
From third on the road, Chaz Mostert found the tyres at Turn 1 on lap 63 in a similar accident to Coulthard's, and finished five laps down in 21st.
Nick Percat was right behind Coulthard when the latter crashed, the Falcon popping back out of the tyre wall to swipe Percat's Timken Commodore, ending his day.
Another Brad Jones Racing-run Commodore, Tim Blanchard's CoolDrive entry rounded Turn 1 and then made subsequent contact with Coulthard's Ford.
Lowndes followed Scott Pye into pitlane for the subsequent Safety Car pitstops, but rode over the right-rear corner of Pye's Commodore when it stopped to wait and double-stack.
It damaged the steering of the Autobarn Commodore and put the retiring legend five laps down, Lowndes ultimately limping home 23rd.