Unbeaten since their defeat by Wigan on the opening day of the summer season, Oldham had the former Wigan full-back, Paul Atcheson, to thank for turning the course of a stormy match.
Atcheson's two tries in four minutes early in the second half demoralised Cas, who were left furious at what they felt was shabby treatment from the referee, Colin Morris. He sent off the Castleford centre, Grant Anderson, for a high tackle on Scott Ranson in injury time at the end of the match, but the Castleford coach, John Joyner, accused him of inconsistency over incidents that left two of his players, Lee Harland and Nathan Sykes, injured.
"Everybody on the ground saw it,'' he said of the second clash that left Sykes with a broken jaw. "We can't let this go. I'm not saying that our man shouldn't have gone, but let's have some consistency.''
The controversy should not completely overshadow an Oldham performance that made a mockery of all the pre-season predictions they were doomed to struggle in the newly formed summer competition.
They overcame the sin-binning of David Bradbury and a back injury that cost them their captain, Martin Crompton, in the first half, to destroy Castleford in 15 minutes after the interval.
Trailing 14-8 at the break, with Adrian Flynn and Dean Sampson having claimed Castleford's tries, Oldham drew on their considerable reserves of determination to take control. A storming 50-yard run from their prop forward Joe Faimalo was a turning point. Although Castleford managed to haul him down before the try line, they could not regroup quickly enough to stop Darren Abram going over from a pass by Francis Maloney, who had scored Oldham's first-half try and was an inspiration after Crompton's departure.
Then Atcheson scored the first of his brace after Maloney's towering cross-field kick had been knocked back by Ranson. Atcheson was soon celebrating again after scooping up a pass from Andrew Patmore to go over for the try that put Oldham 10 points ahead.
A try from Ian Smales, again improved by Botica, ensured a frantic last few minutes, but all Cas could achieve was the dismissal of Anderson.
For the Castleford-born Oldham coach, Andy Goodway, it was an evening to savour. Nobody in the game expected his side to amass seven points in their first five Super League games, but they are enjoying proving the doubters wrong.
Castleford: Flowers; C Smith, Anderson, Flynn, Edwards; Botica, T Smith; Sampson, Maskill, Sykes, Smales, Harland, Tuuta. Substitutes: Gay, Goddard, Steadman, Crookes
Oldham: Atcheson; Ranson, Patmore, Abram, Belle; Maloney, Crompton; Faimalo, Clarke, Cemu, Bradbury, Munro, Hill
Substitutes: Davidson, Topping, Gilbart, Lord.
Referee: C Morris (Huddersfield).