Ireland fly-half Johnny Sexton limped off with a calf injury midway through the first half as Leinster strengthened their hold on home advantage in the quarter-finals of the Champions Cup after a 24-24 draw with Castres.
Until the influential playmaker departed, the Pro12 side had enjoyed the best of the early exchanges on a near-freezing night at Stade Pierre Antoine.
After an early scare, when captain Isa Nacewa was perhaps fortunate not to be penalised for a late shoulder charge on Castres' winger Julien Caminati, the first 10 minutes were all about Leinster.
Sexton opened the scoring with a penalty in the ninth minute and barely 60 seconds later, Robbie Henshaw scored the first of his two tries when he picked up a loose ball near touch on halfway and ran unopposed across field to touch down - and only a charge down from the hosts' full-back Pierre Berard denied Adam Byrne a clear sprint to the line from the kick-off.
In fits and starts, Castres dragged themselves into the game. Leinster were penalised for holding on - and fly-half Julian Dumora rejected a shot at goal in favour of a kick to the corner - only for Devin Toner to claim the lineout. But the clearance was weak, and - after Castres' forwards had softened up Leinster's defence, scrum-half Antoine Dupont danced through a hole in the line to score.
Rory O'Loughlin thought he had won a footrace to score in the corner a minute later - only to be denied by the TMO - and Dumora levelled the scores on 30 minutes after Leinster were penalised for not releasing following a dangerous break from David Smith.
The winger would not be denied in the 35th minute after a smart run and a smarter offload from centre Florian Vialelle gave Smith just enough room to touch down in the corner.
With both Sexton and Nacewa subbed, replacement Ross Byrne took over kicking duties, but fired a penalty wide from near the halfway line after the half-time hooter.
Castres beefed up their front row at half-time, replacing props Antoine Tichit and Daniel Kotze with Mihaita Lazar and Damien Tussac - but the big new men could only watch as, after a solid Leinster scrum, Henshaw scored his second try under the posts three minutes into the second period. Byrne converted to level the scores.
The game swung again in the 53rd minute, when following phase after phase, Smith scored his second try, and Castres' third, at the base of the posts. Dumora converted to make it 24-17.
But a yellow card for Pierre Berard for hands in the ruck a matter of metres from the line 10 minutes later gave the Dublin side the perfect attacking platform. They made no mistake, and Dan Leavy crashed over from close range. Byrne converted to take the scores to 24-24 with less than 15 minutes remaining.
With less than five minutes remaining and pressure mounting, Mick McCarthy was sent to the bin after Leinster conceded a series of penalties near their own line.
But the hosts could not make their brief numerical advantage count.