St Stephens Green and Clongowes had the run of the race up front, but the pack closed in fast in the final furlong, with Laws Of Spin (14-1) steaming home under Chris Hayes.
Joe Tuite's raider Machine Learner came with a rattling late run, but the post came in time for Willie Mullins' four-year-old. Clongowes was third, with Artful Artist fourth.
Hayes said: "I love this horse. I haven't ridden him since I won the Irish Cesarewitch on him. He just travelled so strong in the race.
"I get there a bit sooner than I wanted, but he's tough and genuine."
Mullins said: "It was raining when I was driving up and I thought this horse had no business coming here. The ground is obviously a lot better than we anticipated. He needs good ground.
"He's disappointed us all year and we've kept running him in these handicaps. At the end of last year we thought he might get up into Group class and maybe make a Melbourne Cup horse. Maybe he's an autumn horse.
"I'd say he'll go for the Cesarewitch. The longer trip will suit him and he just wants good ground."
Lightening Quick made a highly-pleasing debut when getting up in the dying strides to claim the Ballylinch Stud Irish EBF Fillies Maiden.
A daughter of Frankel out of 2011 Cheveley Park Stakes heroine Lightening Pearl, the Ger Lyons-trained juvenile was delivered with a late burst by Colin Keane to snatch the spoils.
Ryan Moore sent Bye Bye Baby into the lead soon after the start and she looked all over the winner until being overhauled in the shadow of the post by the 6-1 winner, who scored by a neck.
Lyons said: "She's very like her mother as she needed every yard of the trip to get up and win today. She holds an entry in the Cheveley Park, a race that her mother won, but the decision we have to make is do we bring her back in trip. At the minute I would say 'no'.
"It was a good performance and the first two have finished over four lengths ahead of the rest. She is a filly we liked initially but the last two weeks her work has just been average.
"Gary (Carroll) and Colin kept saying to me she is only dossing and going through the motions at home, so run her.
"I'm pleasantly surprised, but it's what we saw early doors - maybe the closer you get to a race the watery a trainer gets!
"We aimed her for this from way back as the timing is right for the Cheveley Park. We'll have to sit down and decide is it the right thing.
"Her mother was the same. She gave me the impression that she wanted a mile after her first start, and she got faster and faster. It's a lovely high-class problem to have.
"She will run again somewhere this year, but it's just a question of where."