Skipper Brian O'Driscoll tries to set up a Leinster attack
Agen (10) 13
Pen: Miquel (2)
Leinster (8) 25
Tries: Heaslip, Hickie, McCormack
Con: Dempsey, Dunne
Leinster stayed on course for a place in the Heineken Cup knockout stages by earning a gutsy away win over Agen.
Jamie Heaslip's 27th-minute try edged Leinster into a 8-3 lead but Rupeni Caucaunibuca's individual effort helped Agen lead 10-8 at the interval.
Agen's dominance after half-time only yielded a Jerome Miquel penalty.
Denis Hickie's try, converted by Girvan Dempsey, edged Leinster ahead and Andy Dunne's drop-goal was followed by Ronan McCormack's late clinching try.
The first half was a scrappy with affair with Agen fly-half Miquel and Leinster's stand-in kicker Gordon D'Arcy slotting early penalties at either end.
Chris Whitaker's superb break set up Heaslip's 27th-minute try with Hickie delivering a pinpoint pass to the number eight.
D'Arcy, having missed an earlier easier penalty, was unsuccessful with the difficult conversion and further misses by the Leinster centre led to Girvan Dempsey taking the kicking duties in the second half.
However, the Leinster lead was short-lived as Agen's burly winger Caucaunibuca sent a delicate chip over the defence and claimed the bounce ahead of Dempsey to charge under the posts.
Miquel's conversion left Agen 10-8 ahead at the interval and the fly-half added three more points to extend the French club's advantage early in the second half.
With the Agen pack starting to take a firm grip on proceedings, Leinster had a let-off in the 57th minute when Miquel missed a penalty from just outside the Irish province's 22.
Leinster made an immediate impact after finally breaking out of their own half with Whitaker's quick ball setting up the chance for Hickie to squeeze over the Agen line.
Dempsey was entrusted with the kicking duties for the crucial conversion and he held his nerve to edge Leinster into a 15-13 lead.
The score seemed to boost Leinster morale and they dominated possession in the final quarter in a gutsy forward effort.
Dunne's sweetly struck drop-goal in injury-time extended Leinster's lead and there was still time for McCormack to rumble over the Agen line with Dunne converting in the final action of the game.
Leinster coach Michael Cheika:
"I was delighted with how the boys played, particularly in the second half and that rolling maul try just capped it off at the end.
"It's great when you get a reward for the work you put in - they made me very proud to be their coach.
"This is a very difficult place to come and play, but we learned a lot from last year's experience in Bourgoin (where they lost 30-28) and I thought we showed a fair bit of courage.
Agen: Elhorga; Ahotaeiloa, C Stoltz, Mirande, Caucaunibuca; Miquel, Morlaes; Van Niekerk, Narjissi, Meeuws; W Stoltz, Koulemine, Lievremont, Yukes, Soucaze.
Replacements: Fulton for Morlaes (71), Guinazu for van Niekerk (46), Socol for Koulemine (53), Tiatia for Lievremont (73), Culine for Yukes (65).
Not Used: Faaletino, Mignardi.
Leinster: Dempsey; Horgan, O'Driscoll, D'Arcy, Hickie; Warner, Whitaker; McCormack, Blaney, Wright, Hogan, O'Kelly, Keogh, Gleeson, Heaslip.
Replacements: Dunne for Warner (80), Jackman for Blaney (23), Corrigan for Wright (47).
Not Used: Finegan, Jowitt, Easterby, Fitzgerald.
Referee: T Spreadbury (England).