Simon Zebo raced over for a hat-trick of tries to provide the perfect ending to a week in which he was invited to train with the Irish Six Nations squad, and Ronan O'Gara kicked 24 points as the two-times champions saved their best for last.
Having clinched the pool the previous weekend, this game at stadium:mk was all about securing a home draw. They did that and more as they overtook reigning champions Leinster to take the top seed position.
Northampton Saints knew they had to win with a bonus point to stand any chance of reaching the Heineken Cup quarter-finals and also had to be aware that if the Scarlets won in Castres, they could pinch a potential Amlin Challenge Cup place.
As for Munster, the only unbeaten team in the tournament after five rounds of pool matches, they needed to grab at least a losing bonus point to ensure they played their quarter-final at their beloved Thomond Park.
So there was all to play for, although Saints went into the game without their England trio of Chris Ashton (not selected), Tom Wood and Courtney Lawes (injured).
The home side came into the game on the back of five successive wins in all competitions and were seeking revenge for having victory snatched from their grasp by an 84th-minute O'Gara drop goal on matchday one.
They started well and Ryan Lamb rewarded their dominance with two early penalties.
O'Gara was quick to respond, but a penalty try awarded when the Munster pack disintegrated at a scrum in the shadow of their posts allowed Saints to move into a 10-point lead.
Munster looked slightly stunned, but their wealth of experience came to the fore and the metronomic boot of O'Gara gave them some impetus.
Munster had confirmed themselves as pool winners the previous weekend, but there was the tantalising prize of a record unbeaten march through their pool for the first time in their 17 years in the tournament if they could keep their winning run going.
Things were looking good when BJ Botha burrowed his way over from close range for a try and O'Gara's conversion was followed by a penalty that gave them the lead for the first time in the 37th minute.
But Lamb had the last laugh in the first half with another penalty and it was all square at the break.
The capacity 22,000 crowd were gripped by the action and there was no let up in the intensity when the action resumed.
With their home draw under threat, Munster flexed their muscles and two tries in a breathtaking burst seemed to have put the result beyond doubt. Johne Murphy rounded off some great play in the right corner and then Denis Hurley sent Zebo racing clear a few minutes later.
The 12-point lead was cut by a second penalty try awarded for another total destruction of the Munster scrum from five metres out, but the home side could not cut the gap to anything less than four points.
At 26-31 it was still anyone's game but even though Lamb matched two more O'Gara penalties, Zebo's interception try from 60 metres not only sealed the victory but guaranteed a home draw and took Munster ahead of the reigning champions Leinster to the top qualifying spot.
It was the first time this season in Europe that Munster had picked up a bonus point and now they have to break the Heineken Cup hoodoo by becoming the only team to win the trophy by winning nine straight games.
Zebo's hat-trick try and Ian Keatley's conversion took the score over 50 points and Scott Armstrong's last-minute try was hardly any consolation for the shattered Saints.
A penalty from fly-half Stephen Jones two minutes from time earned the
In a dramatic Heineken Cup Pool One contest, Jones' late kick and a 90-metre interception try from flanker Aaron Shingler claimed a deserved win for the West Walians and the runners-up spot which ensures their European season is not over.
Northampton's home defeat to Munster in Milton Keynes aided the Scarlets' cause, but head coach Nigel Davies will be delighted with the grit shown by his side who were missing a host of regular starters through injury.
The only downside for the Scarlets was a second-half injury to Wales fly-half Rhys Priestland, which will be a worry for national coach Warren Gatland so close to the RBS 6 Nations.
Davies had been forced into making nine changes from the side that lost to the Saints in Llanelli the previous week, but it was hardly noticeable in the first quarter.
The Scarlets dominated the early exchanges and were rewarded for their endeavour with a 10th-minute penalty from Priestland.
Playing with their trademark verve and adventure, the Welsh region were causing the Castres defence all sorts of problems and it came as no surprise when they were celebrating the game's opening try thanks to a superb individual effort from number eight Matt Gilbert - on his first European start.
Wales centre Jonathan Davies, who was a constant threat, made the critical burst, but Gilbert still had plenty of work to do to beat the last defender and race into the corner.
Priestland missed the conversion, and the Castres faithful then thought their side had pulled a try back when France wing Marc Andreu dived in at the corner.
Referee JP Doyle consulted the television match official and he adjudged the diminutive speedster had put a foot in touch.
Priestland missed a chance to extend the visitors' advantage by pushing a penalty wide on 26 minutes and, with flanker Richie Pugh hauled down a metre short and the outstanding Davies denied a clear run to the try-line by a last-ditch tackle after intercepting 60 metres out, the Scarlets will feel they should have been further ahead.
Instead, with mistakes and ill-discipline creeping into the Scarlets game, it was the home side who finished an entertaining half the stronger.
New South African recruit Rory Kockott put his side on the board with a penalty on 33 minutes and landed another two minutes before the interval to make it 8-6 at the turnaround.
In contrast to the opening half, it was Castres who flew out of the blocks, and it took some stubborn defence from the Scarlets on their own line to keep the home side out.
The visitors lost Priestland to a leg injury on 53 minutes - a concern not only for the Scarlets, but Gatland just a couple of weeks before the Six Nations opener against Ireland in Dublin.
Then with Castres again pressing the Scarlets' line, Shingler produced his remarkable intervention.
Snaffling a pass 90 metres out, the flanker showed tremendous pace and stamina to outstrip two Castres backs to the line.
Crucially, though, Jones missed with the conversion and, after spilling the restart, the visitors were left to defend for their lives in the final quarter.
Wing Liam Williams produced a try-saving tackle in the corner on Romain Martial, but eventually with Castres number eight Chris Masoe to the fore, all the pressure told with replacement Yannick Forestier driving over from close range.
Full-back Romain Teulet squared things up with the conversion, then Jones pushed another penalty attempt wide.
With the game resting on a knife edge, Jones had another chance to win it on 78 minutes and this time made no mistake to claim another memorable win for the Scarlets on French soil.