It would take a landslide bonus point win for Connacht in Toulouse on Sunday to dislodge Leinster out of the top four for the knockout stages, so hopes remain high for home advantage on the weekend of March 31-April 1/2.

Already guaranteed top spot in Pool 4 before kick-off, there were plenty of holes in a disappointing performance from the visitors as they allowed Castres to seize control and take a 17-10 half-time lead.

An opportunist early try from Robbie Henshaw – his first for the province – established solid foundations and a 10-0 advantage, but Castres’ confidence grew as first half injuries sidelined both Jonathan Sexton (tight calf) and Leinster captain Isa Nacewa (dead leg).

Well-taken converted tries from Antoine Dupont and David Smith, combined with a Julien Dumora penalty, made it 17-10, with the visitors guilty of some poor turnovers and obvious defensive errors.

The second period continued in a similar pattern to the first, Henshaw completing his brace after a forceful run from Adam Byrne off a scrum. Sexton’s replacement Ross Byrne converted to bring Leinster level.

He did likewise after Dan Leavy crossed in the 63rd minute to cancel out Smith’s second seven-pointer of the night. Leavy’s score came after Castres full-back Pierre Berard saw yellow, but it was all hands to the pump for Leinster late on as a Mike McCarthy sin-binning left them clinging to two very hard-earned match points.

There were early warning signs as Castres’ Yannick Caballero knocked on in a threatening position in the Leinster 22. However, Leo Cullen’s side won a penalty from their first scrum put-in and a second infringement – this time in the loose – saw Sexton kick them into an eighth-minute lead.

Just a couple of minutes later, a knock-on from Julien Caminati proved even more costly. Garry Ringrose picked up possession and his attempted pass, dribbled forward by Henshaw, was retrieved by the Athlone man inside the Castres half and he showed his power and pace on a diagonal run to the try-line, with Sexton converting.

However, Castres were full of running too, Sexton shooting up and mistiming his tackle on Berard to open up space on the left and then wily scrum half Dupont’s sidestepping run from closer in saw him strike for a try converted by his half-back partner Dumora.

Rory O’Loughlin was a whisker away from an almost immediate response via a kick through, the covering Berard doing just enough to stop the Leinster Academy star from adding to his recent try haul.

The eager French outfit were level by the half hour mark, a Dumora penalty rewarding a superb midfield break by Samoan-born speedster Smith. Castres’ increasing share of possession saw Leinster remain on the defensive with Nacewa having to cover a number of probing kicks before he limped off.

As the interval approached, Ringrose’s poor attempted tackle allowed the strong-running Florian Vialelle through and his one-handed offload put Smith over near the left corner.

Dumora’s successful conversion gave the hosts a seven-point lead and excellent scrambling from Dupont and Berard duly prevented Jack Conan and Josh van der Flier from sniffing out the table toppers’ second try.

Ross Byrne was off-target with a late penalty from just inside halfway, and Ringrose, having done the hard work with an electric break early in the second half, could not connect with the misfiring Luke McGrath for a potential try.

That much-needed score came via a subsequent scrum, big winger Byrne exposing the Castres half-backs and linking with Henshaw whose impressive footwork took him in under the posts for Ross Byrne to kick Leinster level at 17-all.

Another try might have turned the screw but scrum half McGrath dropped a pass from Rob Kearney on a pacy attack from the yellow shirts. Castres, unbeaten at home since September, showed their clinical edge soon after as their pack went through phase after phase and Smith was able to snipe over, getting in between the aforementioned McGrath and replacement prop Jack McGrath.

Fighting back and composing themselves after a couple of individual errors, Leinster opened the final quarter with a timely third try. Berard earned a yellow card for killing Leinster ball near his own whitewash and subsequent pack pressure led to replacement Leavy muscling his way over for Ross Byrne to convert with aplomb.

It was game on and just as Castres controlled possession and wound down the sin-bin clock, turnover ball and a kick chase launched by Adam Byrne could have seen Leinster get over again. Unfortunately, the ball evaded the clutches of Ringrose and Vialelle got back to thwart Rob Kearney.

Castres were the aggressors in the dying minutes, going very close through their driving maul before successive penalties resulted in replacement McCarthy being binned. 14-man Leinster used scrum possession to clear their lines and settle for a draw which has them on the cusp of a home quarter-final.