|Betfred Challenge Cup|
|Castleford (12) 19|
|Tries: Smith, Mata'utia, Shenton Goals: Richardson 2, O'Brien Drop-goal: O'Brien|
|Salford (12) 18|
|Tries: Livett 2, Mossop Goals: Livett 3|
Gareth O'Brien's drop-goal in golden point extra time booked Castleford's place in the Challenge Cup semi-finals with a 19-18 win over Salford.
Salford twice led in the first half through Harvey Livett tries, but Tigers hit back both times through Daniel Smith and Peter Mata'utia.
Michael Shenton put Cas in front but Lee Mossop scored with 18 seconds left to send the tie to extra time.
But O'Brien's boot set up a semi-final with Warrington on Saturday, 5 June.
It was a dramatic end to the game for O'Brien, who had just returned to the pitch after being one of two Castleford players sent to the sin-bin in the closing stages, which left them desperately trying to hang on to their lead with 12 men - and temporarily 11 - before Mossop's dramatic score.
O'Brien had been sent to the bin with 14 minutes left for a professional foul on Chris Atkin as he attempted to chase down a Tui Lolohea grubber kick, and had been joined there eight minutes later by Liam Watts, who was punished for a late hit on Elijah Taylor.
But former Salford half-back O'Brien was on hand to slot the crucial goal at the end of Castleford's first set of six in extra time after Paul McShane had helped set up field position by brilliantly blocking Kevin Brown's drop-goal attempt and pouncing on the loose ball.
- Relive Castleford's Challenge Cup win over Salford
- Hull FC face Saints, Cas meet Warrington in semis
- Hull FC beat Wigan to reach last four
Powell to meet future employers in last four
Cas coach Daryl Powell has spoken of his desire to leave the club on a high at the end of the season after eight years in charge.
But he will now have to get past the side he will be taking charge of in 2022 if he is to take Tigers to Wembley for the first time since 2014, when they lost to Leeds in the final.
After failing to capitalise on early pressure, they fell behind when Brown's high kick bounced awkwardly near the Cas line and Livett touched down.
Smith soon burrowed over in reply, but Salford took the lead again when Livett broke the defensive line to race in after a quick tap penalty.
Mata'utia slid over in the corner from Grant Millington's pass to level the scores at 12-12 at half-time, before Shenton capitalised on a break by reigning Man of Steel McShane to give Tigers the lead for the first time.
They looked certain to hold on a man short until Mossop carried three defenders over the line with him and somehow grounded the ball over his head, with Livett's simple conversion sending the tie into extra time.
Castleford needed almost four periods of extra time to beat Hull KR in the last round, but needed just one attack this time to eventually overcome last season's beaten Challenge Cup finalists.
'If I hadn't knocked that over I think I would have been sacked' - reaction
Man of the match Paul McShane told BBC Sport:
"We're doing it tough in the cup, but credit to our lads when we were down to 11, they turned up for each other.
"I know they scored at the end but we didn't let our heads go down and dug in again.
"It was gutting [when Salford scored at the end] but it's credit to our resilience in that extra-time period, and Gareth [O'Brien] under pressure slotted that precious one-pointer.
"It will be another tough one in the semi-finals, but you have to do it tough if you want to get to Wembley."
Match-winner Gareth O'Brien told BBC Sport:
"If I hadn't knocked that over I think I would have been sacked next week after being in the sin-bin.
"I was relieved it went over and I'm happy to be in the semis. I would have been kicking myself if it hadn't gone over."
Castleford head coach Daryl Powell told BBC Sport:
"It was another tight one. We also had extra time in the last round against Hull KR, although we had 20 minutes of it that day.
"Today we went down to 11 men so we made it hard for ourselves. It was always going to be a tight battle when you look at the conditions.
"We're not in a great groove at the moment and there's plenty we can improve on, but cup games are all about winning, it doesn't have to be pretty and it certainly wasn't pretty today."
Castleford: Evalds, Olpherts, Mata'utia, Shenton, Turner, Richardson, Trueman, Milner, Millington, Holmes, Massey, McShane, Griffin.
Interchanges: Watts, Smith, Martin, O'Brien.
Sin-bin: O'Brien (66), Watts (74)
Salford: Sarginson, Sio, Watkins, Livett, Williams, Lolohea, Brown, Mossop, Addy, Ikahihifo, Greenwood, Pauli, Taylor.
Interchanges: Atkin, Ormondroyd, Lannon, Burke.