A late Jimmy Gopperth penalty saw Leinster narrowly escape with a 21-20 win against Treviso at the Stadio Monigo.
Lote Tuqiri bagged his first Leinster try while Noel Reid crashed over soon after, but a Ludovico Nitoglia score and the kicking of flyhalf Mat Berquist helped Treviso claw their way back into the game.
A second-half Angelo Esposito try looked like handing Franco Smith's side an unlikely victory until Gopperth secured Leinster's fifth victory of the PRO12 season by the finest of margins.
Leinster's stellar record against Italian opponents made grim reading for Treviso prior to the game, the reigning champions having won their last 11 fixtures.
A more positive statistic for Treviso was that they had only lost one PRO12 game at the Stadio Monigo in 12 months - but the Italians got off to the worst possible of starts.
After Gopperth had missed an early penalty, veteran wing Tuqiri piled over the whitewash on 13 minutes for his first PRO12 score.
And in a breathless spell for the visitors Reid scored with another spellbinding effort two minutes later - Gopperth slamming home the extras after missing his first conversion attempt moments before.
The situation was beginning to look ominous for the hosts but they began their comeback attempt with a Berquist penalty midway through the half.
And Treviso dragged themselves back to within two points when Nitoglia, who had not scored in the PRO12 since his double against Munster in September, dotted down before Berquist converted.
But Leinster were in fine form with a four-game winning streak in all competitions - and allowed themselves some breathing space after the break.
Gopperth made amends for his earlier miss to drill through a 47h minute penalty, before smashing another one between the posts six minutes later.
Treviso however had no plans to lie down for last year's champions and pulled it back to a one-score game as Berquist found the target from the kicking tee once more.
And wing Esposito bundled over on the hour-mark before Berquist's conversion completed a remarkable turnaround.
But with time running out for O'Connor's side Gopperth kept his cool to drill over his third penalty of the match, handing Leinster a dramatic victory.
Tries: Nitoglia, Esposito
Cons: Berquist 2
Pens: Berquist 2
Tries: Tuqiri, Reid
Pens: Gopperth 3
Treviso: 15 Brendan Williams, 14 Ludovico Nitoglia, 13 Andrea Pratichetti, 12 Christian Loamanu, 11 Angelo Esposito, 10 Mat Berquist, 9 Fabio Semenzato, 8 Marco Filippucci, 7 Dean Budd, 6 Manoa Vosawai, 5 Corniel Van Zyl (captain), 4 Marco Fuser, 3 Ignacio Fernandez-Rouyet, 2 Franco Sbaraglini, 1 Alberto De Marchi.
Replacements: 16 Enrico Ceccato, 17 Matteo Muccignat, 18 Pedro Di Santo, 19 Antonio Pavanello, 20 Filippo Giusti, 21 Alberto Sgarbi, 22 James Ambrosini, 23 Alberto Di Bernardo.
Leinster: 15 Darren Hudson, 14 Lote Tuqiri, 13 Brendan Macken, 12 Noel Reid, 11 Darragh Fanning, 10 Jimmy Gopperth, 9 John Cooney, 8 Leo Auva'a, 7 Shane Jennings (captain), 6 Rhys Ruddock, 5 Quinn Roux, 4 Tom Denton, 3 Martin Moore, 2 Aaron Dundon, 1 Michael Bent.
Replacements: 16 James Tracy, 17 Jack O'Connell, 18 Tadhg Furlong, 19 Ben Marshall, 20 Dominic Ryan, 21 Eoin Reddan, 22 Cathal Marsh, 23 Collie O'Shea.