The two points gained is almost enough to secure a home quarter final
Leinster have drawn 24-24 at Castres in their final pool match of the 2016-17 European Rugby Champions Cup.
The Irish province went into the away game in France, knowing that a victory would secure a home quarter final in the next stage of competition, having already qualified from the pool after Round 5.
Ultimately, Leo Cullen's side had to fight back to salvage a draw with two match points the reward for both Leinster and Castres after 80 minutes of action.
While the two points put Leinster on 23 points in the pool and virtually secures a home quarter final, it is not guaranteed depending on whether Connacht can get a bonus point win over Toulouse on Sunday to move onto 23 points.
However, Pat Lam's side would also require the points difference to also go their way by a hefty 50 point margin.
Leinster though started well in Stade Pierre-Antoine as Jonathan Sexton converted a penalty on nine minutes.
Just one minute later and Robbie Henshaw showed a clean pair of heels to the Castres challengers as he raced through and scored the first of his two tries.
Leinster's Rory O’Loughlin scores a try that was later disallowed ©INPHO/Tommy Dickson
Sexton converted to leave Leinster 10-0 up.
However, the French side were determined in their effort to turn the game around and Antoine Dupont scored a try of his own on 20 minutes.
Julien Dumora then converted and kicked a penalty to leave the scores level at 10-10 after half an hour.
Soon Castres were in front when David Smith found a gap in the corner and his converted try left Leinster trailing 17-10 at half time.
However, Leinster started the second half well and responded immediately.
FULL TIME: 24-24...we finish top of the pool and on 23 points...over to the rest of the games now to see how they play out... #CASvLEI— Leinster Rugby (@leinsterrugby) January 20, 2017
Receiving possession off the platform of a scrum, Adam Byrne showed quick feet to engineer space before offloading for the on-rushing Henshaw who scored his second try of the contest.
But Smith scored another try for Castres on 53 minutes as he showed resourcefulness to get over just by the post.
However 10 minutes and with 17 minutes left to play, Daniel Leavy levelled things up with a try of his own.
Ross Byrne converted to earn the draw for Leinster.
The province and Ireland - with the first Six Nations game on January 4th - will have some concerns over the fitness of Sexton, who was replaced by Byrne after suffering a suspected calf injury in the first half.