Castleford Tigers spoiled Gregory Mounis' home Catalans Dragons farewell by registering a 34-28 victory in the Super League on Saturday.
Mounis, 31, is set to retire at the end of the season and was playing in his 300th professional game, while making his final appearance on the home soil of Stade Gilbert Brutus.
But a winning send-off appeared unlikely when the away team romped to a 24-10 half-time lead, thanks to tries from Paddy Flynn, Ben Crooks and a Denny Solomona brace, the latter bagging the Super League's regular-season scoring record by taking his tally to 37.
Luke Gale converted all four tries, with the hosts replying through former Tiger Olivier Elima and Glenn Stewart.
Castleford extended their advantage early in the second half, Crooks and Flynn both going over.
Despite losing Benjamin Garcia to the sin bin for punching Jake Webster, a late Dragons rally saw Eloi Pelissier, Louis Anderson and Richie Myler hit back, Tony Gigot adding the extras for all three tries to make it a tight finish.
But it was not enough to deny Castleford, who end their campaign at home to Widnes Vikings next Sunday, while Dragons finish up with a trip to Wigan Warriors.