Matt Banahan scored three of Bath's nine tries on his farewell appearance as the West Country club sneaked into next season's European Champions Cup after a 63-19 win over London Irish.
Since Sale and Gloucester both lost without a losing bonus point, Bath leapfrogged both to clinch sixth place in the Aviva Premiership having been all but written off just a couple of weeks ago.
It took them only three minutes to open the scoring through Taulupe Faletau, who had signed a new contract at the Rec this week.
Banahan combined on the right with Cooper Vuna, who found the Wales number eight with an inside pass.
Rhys Priestland converted and added the extras again when right wing Vuna crossed unopposed.
The home side then conceded five penalties in succession close to their line, with skipper Matt Garvey sin-binned as referee Matt Carley finally lost patience. The visitors spurned easy kicks for goal on each occasion, however, and Bath eventually punished them for their generosity.
There was a huge roar from the capacity 14,509 crowd as Banahan crashed over from a Kahn Fotuali'i pass on 22 minutes and an equally good, hard line by fellow centre James Wilson provided the bonus-point try nine minutes later.
Priestland had been kicking immaculately from the tee and obliged again on the stroke of half-time with his fifth conversion after hooker Tom Ellis had blasted through the Exiles defence and popped the ball to Elliott Stooke to touch down.
Even at 35-0 down, the Irish kept pilfering the odd breakdown and scrum-half Scott Steele broke clear but had only prop Ollie Hoskins in support.
Bath resumed normal service when Banahan joined a maul close to the Irish line and claimed his second try on 52 minutes. Freddie Burns, on for Priestland, converted, and then juggled a pass to create a second try for Wilson who ran in from 40 metres.
No-one would have begrudged the visitors a try and it came just short of the hour as flanker Josh McNally stretched over the line, but Greig Tonks hit the post with his conversion attempt to leave the score at 49-5.
As both coaching teams emptied their benches, the game became scrappy. But there was another huge roar when Banahan claimed his hat-trick, again from a driving maul, to bring his club tally to a tantalising 99.
Replacement prop Will Vaughan leapt acrobatically over a pile of bodies to score a ninth try, again converted by Burns, but the Exiles went down fighting with late tries by Ben Loader and McNally.