Isa Nacewa's 47th-minute bonus-point try was the highlight of Leinster's workmanlike 33-15 European Champions Cup win over Castres at the RDS.
The Irish province's dominant maul paved the way for three first-half tries - a brace from Sean Cronin and one to mark Jack McGrath's 100th provincial appearance - but Castres were only 19-10 down at the break.
The hosts suffered the double whammy of a penalty try and Luke McGrath's yellow card right on the stroke of half-time, giving the French side a serious lift. Nacewa's fine individual score got Leinster back on track early in the second period, a penalty try rewarded the home scrum on the hour mark and Castres replacement Anthony Jelonch dived over for a consolation try.
Tireless flanker Josh van der Flier delivered a man-of-the-match performance for the victors and 20-year-old fly-half Joey Carbery had an assured European debut, stepping into the shoes of the injured Jonathan Sexton (hamstring).
Nacewa nudged a fifth-minute penalty wide from the right, with full-back Rob Kearney prominent in the air early on. The Leinster captain was also thwarted after a pacy Robbie Henshaw break. But the Castres forwards gave way soon after, Leinster's decision to kick for the corner proving correct as hooker Cronin was driven over in powerful fashion.
Carbery's juggling intercept broke up a promising Castres spell, but dogged French defence prevented the fast-breaking Garry Ringrose and Henshaw from adding to the lead. The wet conditions contributed to Alex Tulou's spill, ruining the big Castres number 8's encouraging run from deep.
However, the visitors were forced to concede a lineout from Nacewa's quick-witted kick through in the 26th minute, and Cronin, having broke off the maul, built enough momentum through a Victor Moreaux tackle to spin over the whitewash, with Nacewa converting.
Benjamin Urdapilleta punished a high tackle from Kearney to get Castres off the mark, but loosehead McGrath muscled over from a close-in 33rd minute ruck that came from further lineout pressure. Urdapilleta missed a chance to cancel out Nacewa's well-struck conversion, however scrum half McGrath's side-entry at a dangerous Castres maul led to his sin-binning and the penalty try, converted by the Argentinean fly-half.
Nacewa stepped in at scrum half on the restart, helping Leinster to ride out the sin-bin period and it was the skipper who exposed Antoine Dupoint's weak defence at a ruck and handed off Geoffrey Palis to claim a superb solo seven-pointer.
With Leinster's reinforced scrum getting the upper hand, Castres did well to avoid further concessions as the home side pressed from advanced set piece ball and breaks by Van der Flier and Carbery.
A succession of penalties led to Castres replacement Thibault Lassale seeing yellow for a maul infringement, and two more scrum penalties had referee Matthew Carley running in behind the posts. Nacewa's conversion completed his 13-point contribution.
Jelonch answered back for Castres with a 68th-minute effort before Leinster missed on two more tries - replacement hooker James Tracy went close from another maul and centre Ringrose was called back for a forward pass from Henshaw, following a blistering run out of his own half by Carbery.