David Holwell, who will be leaving Leinster at the end of the season, slotted a Celtic League record equalling eight penalties and played a key role in setting up Denis Hickie's sole Leinster try before adding the conversion.
The Scarlets' Gareth Bowen also had a good day with the boot, grabbing five penalties, a drop goal and a conversion but it was not enough to prevent the end of the Welsh side's three match winning streak.
Leinster, without the rested centre duo Brian O'Driscoll and Gordon D'Arcy, were slow to get into gear and were not helped when Leo Cullen was sin-binned in the opening minutes for a swinging arm challenge, from which Bowen opened the scores. He extended their lead soon after but Leinster rallied to pull three points back through Holwell's first success, which triggered the kicking duel between the two.
A Bowen drop goal, allied to his third penalty strike, to two further penalties from Holwell ensured the visitors went into the break 12-9 ahead. Declan Kidney's side, bolstered by their returning internationals, stepped up their game in the second half. A break from Holwell led to Ciaran Potts drawing in the Scarlets' Mark Taylor superbly for Hickie to cross in the corner.
Leinster then extended their advantage to 19-12 before a high tackle from Contepomi saw Bowen pull three back. There was still life in the Scarlets at 25-18 down, Tal Selley won the race to touch down after Matthew Watkins' kick ahead. Bowen's conversion drew the sides level, but the final words had to go to Holwell.