Jake Clifford has nailed a dramatic field goal in the 79th minute to fire North Queensland to a 15-12 NRL upset of the Sydney Roosters in Gosford.
Clifford had missed two attempts on Sunday afternoon before converting his third chance to ensure Gavin Cooper celebrated his 300th game in style.
In a tense final six minutes, Roosters duo Cooper Cronk and Luke Keary had three looks combined, but one was charged down and the other two sailed wide.
Playing without captain Michael Morgan due to concussion, Clifford sealed the win with a penalty goal after the siren to help snap a three-game losing streak.
The 21-year-old also posted his first career try in a breakthrough performance.
"This is probably a game we all hoped that was coming for him," Cowboys coach Paul Green said.
"His opposite has been one of the best halfbacks to play the game, so he should take a lot of confidence out of today, which is good. I'm really happy for him."
The victory lifts the Cowboys to 16 points, and within two of the top eight.
The defending premiers, without rested star pair James Tedesco and Boyd Cordner, are eight points back of pacesetters Melbourne in third.
The Roosters had earlier appeared to overcome a slow start when they posted back-to-back tries after being held scoreless for the opening 52 minutes.
Making matters worse for coach Trent Robinson, prop Jared Waerea-Hargreaves might face suspension again after being cited for leading with the head.
Returning co-captain Jake Friend, playing his first game since rupturing his bicep in round seven, kicked the Roosters into gear in the second half.
The veteran hooker first effected a 40-20 kick to turn defence into attack, and followed it up by dummying his way over, before Brett Morris gave them the lead.
However, Cowboys five-eighth John Asiata set up a grandstand finish when he willed his way over in the 70th minute, leading to a field-goal shootout.
The "home" crowd of 14,668 at Central Coast Stadium had little to crow about in an evenly contested first half that yielded just the one try to Clifford.
Waerea-Hargreaves and Josh McGuire provided some early fireworks in a feisty individual battle, including one incident that landed the Roosters' prop on report.
Waerea-Hargreaves had bundled McGuire over onto his backside before appearing to charge into him on the ground with his head.
He wasn't put on report until minutes later after advice from the bunker.
Clifford was also put on report for tripping in the first half, while teammate Jordan Kahu failed to finish the match due to concussion.
Roosters coach Trent Robinson was livid with his team's defence.
"Just unacceptable defence on that part. It's only 12, 13 points scored against. Usually most teams are happy with that, and that's low for us this year," he said.
"At 12-6, we were in control there. We did well and then to let that try in the way that we did - well done for John (Asiata) - but that was a disgrace."