Bayan dug deep to take The Ladbroke at Ascot for Irish trainer Gordon Elliott and rider Davy Condon.
Shelford and the long-absent Balgarry set what looked a healthy gallop up front, tracked within range by Activial.
The latter came to join issue with two to jump, but made a hash of it as Galway Hurdle runner-up Bayan arrived on the scene at the last.
Pine Creek pushed the Irish raider all the way but could never quite get there, finding the line coming a neck too soon. Activial was third with the gallant Shelford fourth.
Elliott was at Leopardstown, where he said of the 14 to 1 winner: “This has been the plan and he had not run over hurdles since Galway.
“It was great, I’m delighted, he was very tough.”
It was an emotional success for Condon, who has been plagued by injuries and was having just his third ride back since a heavy fall at Cork in August.
The jockey suffered three fractured vertebrae in the spill and initially feared he may never ride again after suffering a rare condition called spinal concussion, which briefly left him unable to move from the neck down.
Riding his second winner of the Ascot race after Cause Of Causes for Elliott in 2012, he said: “I’m a bit emotional at the moment, it’s great to be back. I didn’t think I’d make it back. It was my toughest injury so far and I was in a lot of pain.
“I was lucky I had a good group of people around me, Gordon Elliott has been so loyal to me leaving me on the horse. Even though I’m not 100 per cent fit I rushed to get back and I’m delighted he won.
“He was just idling in front and was there a bit soon, but he stays well and I knew I had to press on early because he has real stamina.
“He was tough and responded to every call.”