Valentine Holmes has kicked a 92nd minute field goal to put North Queensland one game away from the NRL grand final with a 32-30 golden-point win over Cronulla.
In front of 12, 447 fans at PointsBet Stadium on Saturday night, the two sides were tied up 30-30 at the end of regulation time after a late Jason Taumalolo try for the Cowboys.
After 10 minutes of extra-time when neither side was able to score, it was left to Sharks premiership winner Holmes to slot the two-pointer against his former team and give the Cowboys a golden-point victory from 44 metres out.
The win guarantees the Cowboys will host a preliminary final at Townsville's Queensland Country Bank Stadium for the first time.
The winner of the semi-final between Parramatta and Canberra is the only hurdle remaining between them and a place in the grand final.
"Val had a carry in our own half in that same set and he said to the boys as he got up and played the ball, 'I'm taking a shot'," said Cowboys coach Todd Payten.
"That's what happened - he was dialled in and delivered.
"We still have some work to do, but it's very fortunate that we can go home and play in front of our home crowd in a prelim to get in a grand final."
The defeat was just Cronulla's second at home this season and they will now face the winners of Sunday's clash between the Sydney Roosters and South Sydney in a sudden-death game at Allianz Stadium next week.
Cronulla's points tally was the highest for a losing side in a finals game since 2014.
In a see-sawing game where the lead changed five times, both sides would have felt hard done by to be playing next week.
The Cowboys began impressively with Tom Gilbert, Peta Hiku and Tom Dearden all crossing before halftime with Murray Taulagi joining them on the scoresheet after the break.
It was Cronulla, though, who courtesy of a two tries from Will Kennedy and other scores from Toby Rudolf, Siosifa Talakai and Cameron McInnes had put themselves in a position to win late in the game.
They led by eight points by the 72nd minute when Connor Tracey was sin-binned by referee Adam Gee for taking out Holmes as the Cowboys centre attempted to dive on an in-goal grubber.
Prior to his sin-binning, Tracey had a try chalked off after Jesse Ramien was deemed to have obstructed Holmes as a lead runner.
"I thought we were hanging in there quite well but probably freaked a bit with 12 men on the field," said Sharks coach Craig Fitzgibbon.
"I didn't think he (Ramien) touched him (Holmes). Did he?
"You need the close up to see if he touched him. I didn't think he did."
Holmes added the penalty goal before converting a late barge-over from Taumalolo that sent the game into extra-time.
Cronulla halfback Nicho Hynes, who converted all five tries, had a field goal charged down in extra-time before Holmes notched his golden point to give the Cowboys a week off and an historic finals game in Townsville.