The handler sent out Mutual Regard to win the handicap feature back in 2014, and Sonnyboyliston (10-1) fended off Quickthorn to once again take the prize back to County Kildare.
Jockey Ben Coen bided his time through the early stages, sitting in mid division while Blue Cup and Humanitarian raced a couple of lengths clear at the head of affairs.
It looked as though Blue Cup had a handy advantage at the top of the straight, but he quickly dropped away, leaving Quickthorn in front.
However, Coen was poised to challenge down the middle of the track - and he edged in front in the final furlong, with 16-1 shot Quickthorn giving his all but eventually falling just short in a photo.
Alounak kept on for third, with Shanroe fourth. Favourites Ilaraab and Mt Leinster both finished down the field in heavy rain on the Knavesmire.
Murtagh said: "It's all the hard work everybody does at home. It's me knowing the kind of horse it takes to win these races, like when I was riding in them.
"I'm going back to my experience as a jockey. That's the kind of horse we need for this track or that race.
"The last time he ran here he ran very well, and I liked the way he came home. He came on for that run, and that gave us confidence.
"He's out of a good staying mare. Fair play to Ben. He was good."