|Betfred Super League|
|Castleford (0) 10|
|Tries: Clare 2 Goals: Rankin|
|Leeds (6) 18|
|Tries: Merrin, Walker, Lui Goals: Sutcliffe 3|
Leeds Rhinos withstood a late fightback to win at West Yorkshire rivals Castleford Tigers and move two points clear of the bottom of Super League.
The hosts had the early play but Leeds skipper Trent Merrin went in under the sticks for the only first-half try.
Jack Walker then caught Castleford cold to go over and put Rhinos 12-0 up.
Two quickfire James Clare tries moved Daryl Powell's side to within four points but a loose Greg Eden pass let Robert Lui score to seal it for Leeds.
Leeds' first victory at Castleford since 2015 moved them up to ninth - two points above basement sides Hull KR and London Broncos - while the home side slipped to fifth after Wigan won on Friday.
Tigers saw an Eden runaway try ruled out for offside, with Cory Aston denied inches from the line, as Leeds put in a faultless showing of line defence.
Merrin's opening score - against the run of play - came after a one-two with Adam Cuthbertson, while Walker went in through the middle from Tom Briscoe's pass to double Rhinos' advantage.
Castleford looked to have no creativity in attack but Clare went in out wide twice in two minutes to give them momentum heading into the last 15 minutes.
But, on his 200th career appearance, Lui showed good footwork to go over after a wayward Eden pass near his own line had given Leeds possession.
That gave Powell's side too much to do on the day he signed a new contract with the club until 2022.
Castleford: Mata'utia, Clare, Minikin, Blair, Eden, Rankin, Ashton, Watts, Milner, Smith, Sene-Lefao, McMeeken, Massey.
Interchanges: McShane, Millington, Cook, Clarkson.
Leeds: Walker, Briscoe, Newman, Hurrell, Handley, Myler, Lui, Cuthbertson, Dwyer, Seumanufagai, Sutcliffe, Ferres, Merrin.
Replacements: Singleton, Smith, Donaldson, Martin.
Referee: Ben Thaler (RFL)