Two-time defending champions Leinster defeated Exeter 29-20 on Saturday to stay alive in the European Cup, but they face a nailbiting Sunday.
The Irish side finished second in Pool Five behind runaway leaders Clermont and can only make the quarterfinals by claiming the remaining best runners-up spot after Montpellier booked their last-eight place earlier in the day.
Leinster had trailed Exeter 17-12 at the interval after converted tries from Neil Clark and a penalty try helped edge the visitors' scores from Gordon D'Arcy and Rob Kearney.
Brian O'Driscoll then brought Leinster level before Jamie Heaslip's try earned a bonus point victory.
Leinster finished their group campaign with 20 points, but Irish rivals Munster can deny them a quarterfinal spot if they score four tries and beat Racing Metro on Sunday in Pool One where Saracens are also expected to qualify by beating Edinburgh.
Clermont had already made sure of their quarterfinal place and Saturday's 29-0 win over the Scarlets gave them 28 points from six wins and a home clash in the next round against Montpellier.
Montpellier defeated Toulon 23-3 in an emotionally-draining clash to reach the quarterfinals for the first time.
Montpellier, playing just days after the death of forwards coach Eric Bechu, finished their Pool Six campaign on 22 points, enough to take one of the two best runners-up spots.
Despite the defeat, Toulon had already made the last eight as pool winners.
Montpellier thrived in the driving rain, scoring tries through Thomas Combezou and Benoit Paillaugue while Toulon, who finished on 23 points, missed out on a bonus point that could have guaranteed a home quarterfinal.
In the day's other Pool Six game, Cardiff Blues saw off Sale 26-14.
Last season's beaten finalists Ulster rounded off their pool campaign with a first win in France at their 15th attempt, beating Castres 9-8.
All their points came from the boot of South African Ruan Pienaar, but a weakened side were unable to get the bonus point that would have strengthened their chances of getting a home quarter-final.
The 1999 European Cup winners, who topped Pool Four with 23 points, will have to wait till the end of the weekend to see if they entertain their quarter-final opponents in Belfast.
"We wanted to win and even by a point, I'll take it. A win is a win," said Ulster coach Mark Anscombe.
"It wasn't our best performance but we knew it would be difficult here. I don't know if we will be playing at home in the quarter-finals, but the most important thing is that we are in the last eight. We will play anyone, anywhere."
Castres went into the final 20 minutes with an 8-6 lead, Remy Lamerat's try and South African kicker Rory Kockott's penalty giving them the edge.
Ulster had two Pienaar penalties to their credit.
Pienaar, who had been moved to fly-half from scrumhalf for the match, sent Ulster into the lead for the first time with a penalty in the 64th minute.
In the pool's other match a surprisingly effective performance by previously winless Glasgow saw the Scottish side beat English giants Northampton 27-20 which ended any hopes the 2000 champions had of making the last eight as a one of the two best runners-up.
All the results and scorers:
Castres 8-9 Ulster
Pens: Pienaar 3
Castres: 15 Pierre Bernard, 14 Max Evans, 13 Seremaia Bai 12 Rémi Lamerat, 11 Marcel Garvey, 10 Rémi Tales, 9 Rory Kockott, 8 Pedrie Wannenburg, 7 Piula Faasalele, 6 Mathieu Babillot, 5 Christophe Samson, 4 Matthias Rolland, 3 Anton Peikrishvili, 2 Marc-Antoine Rallier, 1 Yannick Forestier.
Replacements: 16 Brice Mach, 17 Saimone Taumoepeau, 18 Mihaïta Lazar, 19 Iosefa Tekori, 20 Thierry Lacrampe, 21 Jannie Bornman, 22 Paul Bonnefond, 23 Marc Andreu.
Ulster: 15 Craig Gilroy, 14 Andrew Trimble, 13 Darren Cave, 12 Paddy Wallace, 11 Michael Allen, 10 Ruan Pienaar, 9 Paul Marshall, 8 Roger Wilson, 7 Chris Henry (captain), 6 Robbie Diack, 5 Neil McComb, 4 Louis Stevenson, 3 John Afoa, 2 Rory Best, 1 Tom Court.
Replacements: 16 Rob Herring, 17 Calum Black, 18 Declan Fitzpatrick, 19 Iain Henderson, 20 Mike McComish, 21 Michael Heaney, 22 Paddy Jackson, 23 Chris Cochrane.
Referee: Nigel Owens (Wales)
Glasgow Warriors 27-20 Northampton Saints
Tries: Strauss, Matawalu, Horne
Cons: Wight 2, Horne
Pens: Jackson 2
Tries: Waldouck, Pisi, Foden
Glasgow: 15 Stuart Hogg, 14 Tommy Seymour, 13 Byron McGuigan, 12 Graeme Morrison, 11 Sean Maitland, 10 Ruaridh Jackson, 9 Niko Matawalu, 8 Ryan Wilson, 7 James Eddie, 6 Josh Strauss, 5 Al Kellock (captain), 4 Tim Swinson, 3 Moray Low, 2 Pat MacArthur, 1 Gordon Reid.
Replacements: 16 Doug Hall, 17 Ryan Grant, 18 N/A, 19 Tom Ryder, 20 Alex Dunbar, 21 Sean Kennedy, 22 Scott Wight, 23 Peter Horne.
Northampton: 15 Ben Foden, 14 James Wilson, 13 George Pisi, 12 Dom Waldouck, 11 Jamie Elliott, 10 Steve Myler, 9 Lee Dickson, 8 Phil Dowson, 7 Tom Wood, 6 Calum Clark, 5 Courtney Lawes, 4 Samu Manoa, 3 Paul Doran-Jones, 2 Dylan Hartley, 1 Soane Tonga'uiha.
Replacements: 16 Mikey Haywood, 17 Alex Waller, 18 Tom Mercey, 19 Mark Sorenson, 20 Rhys Oakley, 21 Martin Roberts, 22 Ryan Lamb, 23 Tom May.
Referee: Leighton Hodges (Wales)
Assistant referees: Gwynn Morris Wayne Davies (Wales)
TMO: Huw Lewis (Wales)
Montpellier 23-3 Toulon
Tries: Combezou, Paillaugue
Cons: Paillaugue 2
Pens: Paillaugue 3
Montpellier: 15 Pierre Bérard, 14 Timoci Nagusa, 13 Thomas Combezou, 12 Santiago Fernandez, 11 Yoan Audrin, 10 Francois Trinh-Duc, 9 Benoit Paillaugue, 8 Alex Tulou, 7 Johnnie Beattie, 6 Alexandre Bias, 5 Mamuka Gorgodze, 4 Mickael Demarco, 3 Maximiliano Bustos, 2 Agustin Creevy, 1 Mikheil Nariashvili.
Replacements:16 Rassie van Vuuren, 17 Yvan Watremez, 18 Barry Fa'amausili, 19 Aliki Fakate, 20 Thibaut Privat, 21 Kelian Galletier, 22 Eric Escande, 23 Lucas Amorosino.
Toulon: 15 Delon Armitage, 14 Rudi Wulf, 13 Maxime Mermoz, 12 Matt Giteau, 11 Alexis Palisson, 10 Jonny Wilkinson (captain), 9 Frédéric Michalak, 8 Chris Masoe, 7 Steffon Armitage, 6 Pierrick Gunther, 5 Jocelino Suta, 4 Simon Shaw, 3 Davit Kubriashvili, 2 Mickaël Ivaldi, 1 Andrew Sheridan.
Replacements: 16 Jean-Charles Orioli, 17 Gethin Jenkins, 18 Carl Hayman, 19 Nick Kennedy, 20 Mathieu Bastareaud, 21 Juan-Martin Fernandez Lobbe, 22 Vincent Martin, 23 Joe van Niekerk.
Referee: Alain Rolland (Ireland)
Assistant referees: Stuart Gaffikin (Ireland), Kevin Beggs (Ireland)
TMO: Marshall Kilgore (Ireland)
Exeter Chiefs 20-29 Leinster
Tries: Clark, Penalty
Cons: Steenson 2
Pens: Steenson 2
Tries: D'Arcy, Kearney, O'Driscoll, Heaslip
Con: Sexton 3
Exeter Chiefs: 15 Luke Arscott, 14 Ian Whitten, 13 Sireli Naqelevuki, 12 Jason Shoemark, 11 Matt Jess, 10 Gareth Steenson, 9 Kevin Barrett, 8 Richard Baxter, 7 James Scaysbrook, 6 Tom Johnson, 5 Dean Mumm, 4 Tom Hayes (captain), 3 Hoani Tui, 2 Neil Clark, 1 Ben Moon.
Replacements: 16 Jack Yeandle, 17 Carl Rimmer, 18 Craig Mitchell, 19 James Hanks, 20 Ben White, 21 Will Chudley, 22 Ignacio Mieres, 23 Nic Sestaret.
Leinster: 15 Rob Kearney, 14 Isa Nacewa, 13 Brian O'Driscoll, 12 Gordon D'Arcy, 11 Luke Fitzgerald, 10 Johnny Sexton, 9 Eoin Reddan, 8 Jamie Heaslip, 7 Sean O'Brien, 6 Kevin McLaughlin, 5 Devin Toner, 4 Leo Cullen, 3 Mike Ross, 2 Richardt Strauss, 1 Cian Healy.
Replacements: 16 Sean Cronin, 17 Heinke Van der Merwe, 18 Michael Bent, 19 Rhys Ruddock, 20 Shane Jennings, 21 Issac Boss, 22 Ian Madigan, 23 Fergus McFadden
Referee: Romain Poite (France)
Assistant referees: Christophe Berdos (France), Eric Soulan (France)
TMO: Bernard Dal Maso (France)
Scarlets 0-29 Clermont Auvergne
Tries: Nalaga, Parra, Stanley, Rougerie
Cons: Parra 2, Skrela
Scarlets: 15 Liam Williams, 14 George North, 13 Jonathan Davies, 12 Adam Warren, 11 Kristian Phillips, 10 Aled Thomas, 9 Tavis Knoyle, 8 Rob McCusker, 7 Josh Turnbull, 6 Sione Timani, 5 Johan Snyman, 4 George Earle, 3 Samson Lee, 2 Ken Owens, 1 Phil John.
Replacements: 16 Matthew Rees, 17 Rhodri Jones, 18 Jacobie Adriaanse, 19 Richard Kelly, 20 Aaron Shingler, 21 Gareth Davies, 22 Gareth Maule, 23 Andy Fenby.
ASM Clermont Auvergne: 15 Lee Byrne, 14 Julien Malzieu, 13 Aurélien Rougerie (captain), 12 Benson Stanley, 11 Napolioni Nalaga, 10 David Skrela, 9 Morgan Parra, 8 Elvis Vermeulen, 7 Alexandre Lapandry, 6 Julien Bonnaire, 5 Nathan Hines, 4 Jamie Cudmore, 3 Davit Zirakashvili, 2 Benjamin Kayser, 1 Raphael Chaume.
Replacements: 16 Ti'i Paulo, 17 Vincent Debaty, 18 Daniel Kotze, 19 Julien Pierre, 20 Damien Chouly, 21 Ludovic Radoslavjevic, 22 Kevin Senio, 23 Regan King.
Referee: Neil Paterson (Scotland)
Assistant referees: David Changleng (Scotland), Adrian Graves (Scotland)
TMO: Jim Yuille (Scotland)
Cardiff Blues 26-14 Sale Sharks
For Cardiff Blues:
Tries: Williams, Paterson
Cons: Halfpenny 2
Pens: Halfpenny 4
Tries: Taylor, Croall
Cons: Miller 2
Cardiff Blues: 15 Leigh Halfpenny, 14 Alex Cuthbert, 13 Owen Williams, 12 Jamie Roberts, 11 Harry Robinson, 10 Rhys Patchell, 9 Lloyd Williams, 8 Andries Pretorius, 7 Sam Warburton, 6 Josh Navidi, 5 James Down, 4 Lou Reed, 3 Scott Andrews, 2 Rhys Williams, 1 Sam Hobbs.
Replacements: 16 Kristian Dacey, 17 Nathan Trevett, 18 Benoit Bourrust, 19 Robin Copeland, 20 Michael Paterson, 21 Lewis Jones, 22 Jason Tovey, 23 Dafydd Hewitt.
Sale: 15 Cameron Shepherd, 14 Tom Brady, 13 Jordan Davies, 12 Mark Jennings, 11 Charlie Amesbury, 10 Rob Miller, 9 Will Cliff, 8 Richie Vernon, 7 David Seymour, 6 James Doyle, 5 Kearnan Myall, 4 Tom Holmes, 3 Vadim Cobilas, 2 Tommy Taylor, 1 Aston Croall.
Replacements: 16 Marc Jones, 17 Ross Harrison, 18 Eifion Lewis-Roberts, 19 Richie Gray, 20 Tom Cruse, 21 Nathan Fowles, 22 Danny Cipriani, 23 Mark Cueto.
Referee: Peter Fitzgibbon (Ireland)