Premiership leaders Bristol Bears secured a home semi-final tie with a narrow bonus-point win at Leicester Tigers after a dramatic finale.
Trailing 26-16 heading into the final 20 minutes, Julian Montoya powered over to drag Tigers to within three points.
The Bears gave away a succession of penalties in the closing stages, and replacement prop Nahuel Tetaz Chaparro was sin-binned in added time.
The visitors survived a final five-metre scrum to close out the match.
Tigers head coach Steve Borthwick and Bears director of rugby Pat Lam were involved in a heated touchline discussion with referee Ian Tempest over who should replace Tetaz Chaparro.
John Afoa, a late replacement in the starting line-up for the injured Kyle Sinckler, had earlier been withdrawn for tactical reasons and eventually returned.
But more than six minutes had passed, which allowed Bristol time to recover and regain their composure.
Tempers flared after the final whistle, with players from both teams clashing on the side of the pitch.
Bears almost undone by ill discipline
Earlier, Semi Radradra and Harry Randall carved through the Leicester defence to put the Bears 14-6 up at the break.
Johnny McPhillips had kicked three penalties for Leicester and then converted Hanro Liebenberg's try, which nudged Tigers 16-14 ahead 15 minutes into the second half.
But two quick-fire scores from Max Malins and Radradra saw the visitors re-establish a 10-point advantage.
The sin-binning of Bristol hooker Jake Kerr allowed Tigers back into the game and Montoya crashed over from a rolling maul from a five-metre line-out.
Leicester continued to push for the win which would have secured a place in the European Champions Cup next season, and gained momentum as Bristol's penalty count increased.
Yet the Tigers were ultimately to be denied despite the vocal backing of about 6,000 fans at Mattioli Woods Welford Road.
Leicester Tigers head coach Steve Borthwick told BBC Radio Leicester:
"I'm obviously disappointed to lose the game but I'm proud of a lot of things the players did.
"It was so good to have our supporters here at the stadium, and we took a step forward.
"Ultimately we weren't good enough and we need to make sure we are a better team. It is clear we are not a top-four team."
On the late argument on the touchline: "There are people far more educated in the way substitutions work than I.
"I am not a referee or a fourth official. I'll let them think about what has happened."
Bristol Bears director of rugby Pat Lam told BBC Radio Bristol:
"The whole second half we were poor as a team.
"What I am really proud of is that these boys find a way. Players stood up and hung in there - they could easily have folded.
"It shows how much it meant to get a home semi-final. What happened at the end is huge for us as a team and a culture, as this is what galvanises you."
On the late argument on the touchline: "John Afoa got injured a couple of weeks ago at the Gloucester game and was due back next week.
"On Thursday Kyle felt his hamstring tighten up and he failed a fitness test. We made a call to start John and then bring him off at half-time.
"At the end we had the yellow card. I thought John had come off as an injury [replacement], but it was down as tactical.
"The Leicester guys came in and started hammering us and accusing us of all sorts of things. John got annoyed with that, and said 'I'm going' and went and did it."
Leicester: Steward; Potter, Moroni, Scott, Murimurivalu; McPhillips, B Youngs; Genge, T Youngs (capt), Cole, Wells, Henderson, Martin, Reffell, Liebenberg.
Replacements: Montoya, Whitcombe, Heyes, Lavanini, Wiese, Wigglesworth, Henry, Nadolo.
Bristol: Malins; O'Conor, Radradra, S Piutau, Purdy; Sheedy, Randall; Y Thomas, Capon, Afoa, Attwood, Vui, Luatua (capt), D Thomas, Hughes.
Replacements: Kerr, Woolmore, Tetaz Chaparro, Joyce, Earl, Uren, Lloyd, Leiua.
Sin-bin: Kerr (65), Tetaz Chaparro (80+3).
Referee: Ian Tempest (RFU).