Isa Nacewa rescued a late losing bonus point for Leinster which kept them top of Champions Cup Pool Four following a 22-16 defeat to Montpellier at the Altrad Stradium.
Nacewa converted his own 79th-minute try to leave Leo Cullen's men a point clear of Castres and Montpellier in the table, ahead of their December double-header against Northampton.
Leinster are now winless in their last six European trips, with Sunday's result leaving the four teams in the pool with one victory each after the opening two rounds.
Poor handling conditions made for a tight first half until well-taken tries from Vincent Martin (28) and Nemani Nadolo (34) saw Montpellier march into a 14-3 half-time lead.
Leinster's defence let them down for those converted scores and Jamie Heaslip's 58th-minute blunder handing man of the match Nadolo an easy finish for his second try while Rob Kearney was in the sin-bin.
However, Garry Ringrose and Heaslip came to the fore as Montpellier's big forwards began to tire, and captain Nacewa raided in from the left touchline for what could prove to be a priceless seven-pointer.
The Irish province wore red T-shirts with the initials 'AF' and the number eight for the minute's applause in memory of late Munster head coach Anthony Foley. They stayed solid through three early scrums, while Zane Kirchner and Heaslip were both prominent in defence.
There were turnovers aplenty on the damp, muddy pitch, with Montpellier - narrow losers in Northampton last week - unable to convert their territorial advantage into points.
The hosts' robust maul drew the first shot at goal in the 20th minute but South African Frans Steyn struck the left post from the 10-metre line, and a right-sided kick from Nacewa nudged Leinster ahead five minutes later.
However, Montpellier replied with a try out of nothing on the half-hour, Cian Healy knocking on in contact and centre Martin running hard against forwards to slice straight through from 40 metres out. Steyn converted from the right for 7-3.
Buoyed by that score, the French side used good width from a lineout to tee up giant Fijian winger Nadolo and he bumped off Rob Kearney to dive over in the left corner, with Steyn adding a textbook touchline conversion.
With Jonathan Sexton's tight hamstring forcing him off, Joey Carbery started the second half but there was little the 20-year-old fly-half could do as Montpellier made headway in the maul and scrum.
Steyn turned a scrum penalty into three points before Nacewa punished an offside from Shalva Mamukashvili to make it 17-6, rewarding some decent attacking from Leinster.
Referee Luke Pearce then ruled that Kearney's challenge on Joffrey Michel was late as the Montpellier full-back chased his own kick. Kearney appeared to stand his ground but Pearce's review with TMO Geoff Warren led to a yellow card.
It went from bad to worse for Leinster as, just two minutes later, Heaslip's pass off the side of a scrum close to his own try-line was intercepted by Nadolo for a gift-wrapped five-pointer.
But Leinster dug deep to rack up 10 crucial points during the closing 18 minutes, their bench proving a timely spark along with Ringrose's midfield runs.
Nacewa notched his third successful penalty and, after replacements Dan Leavy and Jamison Gibson-Park were both stopped short of the line in the same attack, the visitors reloaded and Gibson-Park's bullet pass put Nacewa over with just seconds left.