Cardiff Blues extinguished any hopes Castres had of making the Heineken Cup quarter-finals with a 14-9 win on Friday.
The Blues kept alive their slim hopes of qualifying for the Amlin Challenge Cup as they claimed a deserved win at Cardiff City Stadium.
The Blues already had no hope of reaching the last eight in the top-tier competition but this win keeps them in the hunt for a runners-up spot which would put them in the quarter-finals of the Challenge Cup.
But they may be left to rue the losing bonus point the French visitors picked up to keep themselves in second place by a single point with one round of games to go.
The hosts, outplayed up front when they visited Castres, will be happy with the dominance of their scrum, while skipper Paul Tito controlled the line-out, but they were unable to convert possession into points.
Castres, needing at least a victory to prevent Northampton winning the group, stole a Blues throw at the first line-out and laid siege to the home 22, but had to settle for a penalty by centre Seremaia Bai, who went on to miss a further shot at goal.
The Blues gradually came into the game and Dan Parks kicked two penalties to put them 6-3 up.
Both kickers missed further chances in a war of attrition, but the Blues then produced a rare moment of class for the game's only try.
Having turned the ball over in midfield, the home side spread it right, a looped pass from Parks followed by a neat kick ahead by Kiwi centre Casey Laulala.
Flying Wales winger Leigh Halfpenny reached it first, dribbling past a stranded French defender before picking up and setting off on a curving run around the covering tacklers and stretching over the line. Parks missed the simple conversion.
The second half saw Castres again fall foul of referee Andrew Small, who responded to their persistent offending by showing a yellow card to replacement Wing Yoan Audrin, while Parks claimed the three points.
Despite being down to 14 men, a Bai penalty kept the visitors interested, but the Fijian, who began his European career in Wales with Cross Keys, missed a further kick from wide out after the returning Audrin had intercepted an errant pass by Blues hooker Rhys Thomas.
The home side were showing the greater adventure, with Laulala and Halfpenny always a threat but, after Tito had been held up short, Parks made a hash of a straightforward drop-goal.
Replacement Pierre Bernard then kicked a long-range penalty to secure the vital bonus point and further diminish the possibility of the Blues going further in Europe this season.
Pens: Parks 3
Pens:Bai 2, Bernard
Yellow card: Audrin (Castres -43rd min);
Cardiff Blues: 15 Chris Czekaj, 14 Leigh Halfpenny, 13 Casey Laulala, 12 Jamie Roberts, 11 Richard Mustoe, 10 Dan Parks, 9 Tom Slater, 8 Maama Molitika, 7 Martyn Williams, 6 Andries Pretorius, 5 Paul Tito (c), 4 Deiniol Jones, 3 Tafa'ao Filise, 2 T Rhys Thomas, 1 John Yapp.
Replacements: 16 Gareth Williams, 17 Scott Andrews, 18 Sam Hobbs, 19 Bradley Davies, 20 Ben White, 21 Ceri Sweeney, 22 Dafydd Hewitt, 23 Tom James.
Castres: 15 Florian Denos, 14 Matthieu Nicolas, 13 Romain Cabannes, 12 Seremaia Bai, 11 Marc Andreu, 10 Cameron McIntyre, 9 Alexandre Albouy, 8 Jannie Bornman, 7 Steve Malonga, 6 Gambo Adamou, 5 Kirill Kulemin, 4 Matthias Rolland, 3 Daniel Saayman, 2 Mathieu Bonello, 1 Yannick Forestier.
Replacements: 16 Akvsenti Giorgadze, 17 Anton Peikrishvili, 18 Luc Ducalcon, 19 Joe Tekori, 20 Chris Masoe, 21 Romain Teulet, 22 Pierre Bernard, 23 Yoan Audrin.
Venue: Cardiff City Stadium
Referee: Andrew Small (England)