Leinster needed a last-minute penalty from Fergus McFadden to snatch a 16-13 win over the Scarlets at the RDS on Friday.
McFadden scores all of Leinster's points as they stay top of the RaboDirect table.
Scarlets played their part in a thrilling contest, but in the end their indiscipline cost them right at the death.
The away side got off to a good start here, and indeed took the lead after five minutes as Stephen Jones landed a penalty. It didn't take Leinster long to respond though, and they found themselves level minutes later, McFadden on target for the home side.
Both teams then kicked away needless ball for the next ten minutes, with both struggling to build any momentum in the contest.
Leinster thought they had a try midway through the half, only for the TMO to rule it out.
Scarlets seemed to get a lift from that decision against Leinster, and the Welsh side took the lead soon after with Dan Newton finishing off a wonderful Scarlets move. Jones added the extras to give them a 10-3 lead.
McFadden had a chance to get Leinster closer, but missed a penalty chance. Indeed, the hosts had a series of chances to restore parity before the break, but couldn't get through a resilient Scarlet's defence, with the score staying the same at half time.
The home side came out a different team after the restart, and scored a try after just two minutes.
McFadden danced past a few Scarlets' defenders to dive over, and added the extras to leave it at ten points apiece.
The visitors responded well though, and after going close to another try themselves, Dan Newton slotted over a penalty to restore the away lead.
McFadden didn't waste much time in bringing the home side back in it though, and going into the final quarter, the sides were locked at 13-13.
Both sides had chances for winning scores, but as the last minutes approached, it looked like a draw was on the cards.
That was until McFadden stepped up with the very last kick of the game to give Leinster the win.
Pens: McFadden 3
Con: S. Jones
Pens: S. Jones, Newton
Leinster: 15 Isa Nacewa, 14 David Kearney, 13 Eoin O'Malley, 12 Fergus McFadden, 11 Fionn Carr, 10 Ian Madigan, 9 Eoin Reddan, 8 Rhys Ruddock, 7 Shane Jennings, 6 Kevin McLaughlin (c), 5 Devin Toner, 4 Damian Browne, 3 Jamie Hagan, 2 Sean Cronin, 1 Jack McGrath.
Replacements: 16 Richardt Strauss, 17 Heinke van der Merwe, 18 Nathan White, 19 Leo Auva'a, 20 Dominic Ryan, 21 Isaac Boss, 22 Noel Reid, 23 Brendan Macken.
Scarlets: 15 Dan Newton, 14 Liam Williams, 13 Gareth Maule (c), 12 Scott Williams, 11 Andy Fenby, 10 Stephen Jones, 1 Rhodri Jones, 2 Emyr Phillips, 3 Deacon Manu, 4 Sione Timani, 5 Dominic Day, 6 Josh Turnbull, 7 Johnathan Edwards, 8 Kieran Murphy
Replacements: 16 Craig Hawkins, 17 Phil John, 18 Peter Edwards, 19 Damian Welch, 20 Ben Morgan, 21 Liam Davies, 22 Adam Warren, 23 Viliame Iongi.
Referee Nigel Owens (WRU)