Castleford Tigers extended their winning run over Wakefield Trinity to 13 games in a hard-fought derby clash on Friday night.
James Clare was the hero for the men in black and orange as he crossed for a second-half hat-trick to reignite the visitors' top-five challenge.
Wakefield weathered an early Castleford storm to go in 10-8 ahead at the break but back-to-back scores from the Tigers early in the second half proved decisive.
Trinity's wait for a victory over their neighbours goes on, with their last win in this fixture coming in the early rounds of the 2015 season.
Clare grabbed his first try minutes into the second half, after taking a superb pass from Jake Trueman to dot down in the corner.
Jordan Rankin then leapt high above opposite number Ryan Hampshire to take a Peter Mata'utia kick and score behind the posts.
That took the Tigers from 10-8 down to 10-20 ahead and although Danny Brough got Wakefield back in the game with a well-taken try, three unanswered tries in the final quarter took the contest away from Trinity.
Clare scored twice more, finding space on the left before Rankin scored a carbon copy of his first, leaping above Hampshire, to deliver the final blow.
Castleford dominated the first 10 minutes of the contest but failed to fashion any real opportunities.
Wakefield gradually worked their way into the game, gaining better field position as the half ticked toward the half-way point.
The biggest two moments of the first quarter came from both sets of defences.
Firstly, James Clare took a flicked pass from Greg Minikin but was swiftly bundled into touch by a host of Trinity defenders.
At the other end, Mason Caton-Brown received the ball on the left wing but was carried over the sideline by a trio of Tigers' players.
As the game reached the second quarter, Wakefield gained more control and soon made it tell on the scoreboard.
Brough kicked a penalty goal following a rampaging run from Pauli Pauli, who had been held down in the tackle.
A mistake from the Tigers then gifted Wakefield the opener.
Tuoyo Egodo knocked on attempting to collect a kick and Reece Lyne pounced to gain possession.
The centre's inside pass was then knocked on but Kyle Wood stormed onto the bouncing ball to crash over for Wakefield.
Brough landed the conversion to surpass Paul Deacon in Super League's list of all-time points scorers.
The half-back now has 2,423 career points, 10 ahead of Deacon who retired in 2011.
It was a case of the ridiculous to the sublime for Egodo, who got Castleford straight back into the game with a well-taken try.
The winger took the ball and twisted out of the attempted tackle from Ben Jones-Bishop before reaching out to plant down in the corner.
Trinity regained possession from the restart before Brough added another two points with a penalty goal after Castleford were penalised for a ball steal.
The away side hit straight back, however, largely thanks to the efforts of stand-off Jake Trueman.
The young half-back broke on halfway before finding Oliver Holmes on his outside. The forward sped clear to plunge over in the corner, marking his first appearance since April in the best way possible.
And Castleford's fightback continued after the interval with Clare's hat-trick and Rankin's brace securing a vital two points.
Wakefield Trinity: Hampshire, Jones-Bishop, Lyne, Tupou, Caton-Brown, Miller, Brough, Wood, Tanginoa, Pauli, Arundel, Batchelor. Subs: Crowther, King, Kopczak, Hirst.
Castleford Tigers: Rankin, Clare, Blair, Minikin, Egodo, Trueman, Mata'utia, Watts, McShane, Clarkson, Sene-Lefao, McMeeken, Milner. Subs: Massey, O'Neill, Millington, Holmes.