Castleford 31 (14)
Tries: Ward, Fletcher 2, Shenton, McGoldrick
Goals: Brough 5
Drop: Brough
Leeds 30 (12)
Tries: Burrow, McGuire 2, Donald, Millard
Goals: Burrow 5
Castleford held off a stubborn Leeds side to win a thrilling Super League clash at the Jungle.
The Tigers carved out a 22-12 lead after 46 minutes thanks to tries from Danny Ward, Adam Fletcher, Michael Shenton and Ryan McGoldrick.
Danny McGuire's second try for Leeds reduced the deficit but Danny Brough's vital drop edged Cas further ahead.
Scott Donald and Fletcher traded tries and although Shane Millard crossed for Leeds late on, the Tigers held on.
The victory boosts Castleford's bid for survival in Super League as they are now five points ahead of the basement clubs.
Tigers fans must have feared the worst when they went behind to a Rob Burrow try after just four minutes.
Leeds were the stronger side in the opening exchanges but that all changed when Ward charged over from 40m out.
After a spell of pressure, Fletcher crossed on 24 minutes but Leeds regained the lead soon after Burrow claimed his opening try.
Shenton scored just before the break and McGoldrick intercepted McGuire's pass to cross on 46 minutes, which gave Cas a 10-point lead.
Leeds though refused to buckle and although they scored three tries in the last 30 minutes, Castleford were able to hold on.
Castleford coach Terry Matterson:
"I wasn't too sure how we would handle the 80 minutes physically against a quality side like Leeds.
"I think Leeds will probably be a bit disappointed with their performance, but it was a fantastic effort from our guys.
"I was disappointed we conceded 30 points, but winning was the most important thing today. However, there is still a lot of work to be done."
Leeds coach Tony Smith:
"We made a few too many errors. Castleford were the better side - just.
"I thought Castleford were terrific in the first half, but I really like the spirit shown by our boys against very determined opponents.
"Castleford showed that bit of extra urgency, particularly early in the game."
Castleford: Platt, Dyer, Viane, Shenton, A. Fletcher, McGoldrick, Brough, Sculthorpe, Henderson, Nutley, Manu, Ward, Lupton. Replacements: Huby, Fa'aoso, Roarty, R. Fletcher.
Leeds: Smith, Donald, Walker, Senior, Williams, McGuire, Burrow, Jones-Buchanan, Millard, Scruton, Peacock, Poching, Lauitiiti. Replacements: Diskin, Bailey, Gibson, O'Neill.
Referee: K Kirkpatrick (Warrington).