Leeds Rhinos beat Catalan Dragons in a thrilling encounter to move within one win of the Super League Grand Final.
Clint Greenshields put the hosts ahead before Stevie Ward and Shaun Lunt went over for Leeds in quick succession.
Damien Blanch cut the deficit to 14-12 at half-time and scored after the break to put the Catalans two points ahead.
Carl Ablett and Danny McGuire put Leeds in front, Thomas Bosc closed the gap, before Kevin Sinfield's fifth penalty and McGuire's drop-goal made it safe.
It was a sad way for Trent Robinson to end his reign as Catalan coach - he will now return to Australia to take charge of Sydney Roosters.
The first score of the night went the home side's way.
Back-to-back penalties heaped pressure on Leeds before Greenshields went over in the left-hand corner - a try awarded after being reviewed by the video referee.
Leeds, who beat St Helens in last year's play-off final, thought they had scored their first try but were on the wrong end of a video review again, as Ben Jones-Bishop's neat finish was ruled out for obstruction earlier in the play.
The home side dominated much of the first 40 minutes, but it was the Rhinos who finished with a first-half lead after two tries in as many minutes just before the break.
First Zak Hardaker's short pass found Ward to score and then a great play by Jamie Jones-Buchanan set up Lunt, who had scored on his back in April, for try number two - Sinfield kicking the extras on both occasions.
There was still time for Blanch to intercept a loose McGuire pass and Dureau, who missed with his earlier attempt at goal, converted to close the gap to 12-10 on the half-time whistle.
The hosts had a great start to the second half as Dureau's pass over the top sent Blanch free for his second try with the former narrowly missing the conversion.
Ablett latched onto McGuire's stab kick to swing the advantage back to Leeds, before Ryan Bailey's 50-metre run was the inspiration for McGuire's try only a minute later.
Bosc's try set up a nervy finish but Sinfield's fifth penalty and McGuire's drop-goal made sure of victory for the Rhinos.
VIEW FROM THE DRESSING ROOM
Catalan Dragons coach Trent Robinson:
"I'm really disappointed. I thought the boys gave it a heap.
"We've been battling referees all year and tonight I thought our boys deserved better."
Dragons second-rower Steve Menzies:
"We just went to sleep twice for a couple of minutes and they scored back-to-back tries.
"They're a team that can hurt you from anywhere on the field.
"Those lapses came back to haunt us. We gave ourselves a chance but we needed to be a bit more composed."
Leeds coach Brian McDermott:
"I'm so proud to be in charge of a courageous group of young men prepared to do anything to get the job done.
"It's a fantastic result. Commiserations go to Catalan, who have been sensational all year.
"This is a significant win, coming over here to their backyard."
Rhinos captain Kevin Sinfield:
"It was a really tough game. We expected it to be like that.
"The last two times we've come here we found it really tough and got beat.
"I thought our middle men were really strong for us and set up a great platform."
Catalan Dragons: Greenshields, Blanch, Sa, Duport, Millard, Bosc, Dureau, Ferriol, Henderson, Casty, Menzies, Anderson, Baitieri.
Replacements: Pryce, Mounis, Fakir, Paea.
Leeds: Hardaker, Jones-Bishop, Watkins, Ablett, Sinfield, McGuire, Hall, Kirke, Burrow, Peacock, Jones-Buchanan, Delaney, Bailey.
Replacements: Clarkson, Griffin, Ward, Lunt.
Referee: Ben Thaler (Wakefield).