Warriors hopes of a place in the European Challenge Cup for a second consecutive year were ended by a hat-trick of tries from Castres’ French international scrum-half Rory Kockott.
Warriors needed a bonus point win to secure qualification and appeared to be on their way when Michael Heaney crossed for the third try six minutes into the second half.
At that stage Warriors led 27-12 but Castres were strengthened by the replacements they made and they secured their own place in the last eight by scoring three converted tries in the final 26 minutes.
Two of those tries were scored while Warriors had GJ van Velze in the sin bin which made the task of stopping Castres’ powerful driving maul even more difficult.
It was a disappointing end to match that started so brightly for Warriors who played with such pace and ambition in the first half.
When Castres went offside under pressure from Ollie Lawrence, who snaffled a superb crossfield kick from Jamie Shillcock, up stepped Weir to apply the punishment.
Castres were also dangerous on the counter and, having forced Warriors to concede a five metre scrum, Kockott nipped in down the blindside.
Warriors’s response was swift and decisive with Shillcock’s pace and elusive running carving open the Castres defence and carrying him to the line with Weir again converting.
Kockott missed the opportunity to trim the deficit when he scuffed a kickable penalty, much to his audible disgust, and it was Warriors who scored again with Shillcock leading a superb counter-attack after Castres coughed up possession on the home 22.
Castres eventually hauled down Shillcock but the attack was well supported by Ashley Beck, Ted Hill and Marco Mama who went over his second try in as many matches.
Weir tagged on the extras but Castres hit back with a powerful surge from a lineout which shunted tighthead prop Wilfrid Hounkpatin over and this time Kockott found the target with his conversion.
But there was still time for Warriors to score again as Castres knocked on from the restart, buckled under pressure from Warriors’ powerful scrum and Weir did the rest.
Warriors third try, created by Perry Humphreys, finished by Heaney and converted by Weir had Warriors’ supporters thinking about the quarter-finals.
But what had appeared a straightforward calculation became more complicated as Kockott crossed twice from close range either side of another drive over from Baptiste Delaporte.
Warriors could still have qualified had they scored a converted fourth try but Castres played a clever territorial game in the final quarter and sealed the win with Kockott’s third try. Dragons, who beat Enisei-STM with a bonus point win at Rodney Parade, join Castres in the quarter-finals.
Warriors | 15 Jamie Shillcock (Pennell 63), 14 Perry Humphreys, 13 Ollie Lawrence (Venter 47), 12 Ashley Beck, 11 Nick David, 10 Duncan Weir, 9 Michael Heaney (Kitto 53), 1 Ethan Waller (Bower 60), 2 Matt Moulds (C) (Taufete’e 53), 3 Nick Schonert (Palframan 53), 4 Anton Bresler, 5 Graham Kitchener (Kitchener 53), 6 Ted Hill, 7 Marco Mama, Cornell du Preez.
Replacements | 16 Joe Taufete’e, 17 Ryan Bower, 18 Richard Palframan, 19 Andrew Kitchener, 20 GJ van Velze, 21 Jono Kitto, 22 Francois Venter, 23 Chris Pennell.
7m | Weir pen 3-0
16m | Kockott try 3-5
18m | Shillcock try 8-5
19m | Weir con 10-5
33m | Mama try 15-5
34m | Weir con 17-5
37m | Hounkpatin try 17-10
38m | Kockott con 17-12
40m | Weir pen 20-12
46m | Heaney try 25-1
47m | Weir con 27-12
54m | Kockott try 27-17
55m | Kockott con 27-19
70m | Delaporte try 27-24
71m | Kockott con 27-26
75m | Kockott try 27-31
76m | Kockott con 27-33