Farraaj got the better of a protracted duel with Zain Eagle to take the 55th John Smith's Cup under Andrea Atzeni.
Tom Eaves was enterprising abord Zain Eagle, who was two lengths clear coming off the home turn and stole an even greater advantage when quickening up before the two-furlong pole.
But in a race where it didn't pay to be too far off the pace, it was Farraaj, who had sat second almost from the start, who eventually got on top of Zain Eagle just inside the final furlong and powered on score by a length and a half.
The 6/1 chance was following up victory at Epsom on Derby Day and giving jockey Andrea Atzeni back-to-back victories in the race after his success aboard Danchai 12 months earlier.
Zain Eagle (20/1) finished a further length and three-quarters in front of 4/1 favourite Bold Sniper with Educate (20/1) a never-nearer fourth and Chancery fifth for each-way backers with Sky Bet.
- Photo Galleries/
- Saturday Action
Atzeni beamed: "It's a great race to win and he's a lovely horse. I was drawn really wide but he jumped really well and I managed to get a good position.
"He travelled beautifully and I was always going to get there in the end.
"He's a good horse on his day and the key with him is the ground - he has to have fast ground."
Varian's assistant David Eustace added: "He's not very big, so the weight was the worry.
"He's a good horse on his day, he just needs rock-hard ground. There was no pace, which was unusual for a race like this.
"From stall 22 we knew he had to go on and Andrea gave him a great ride, got him in the box seat and the horse making the pace (Zain Eagle) gave us a good tow into the race.
"For a second I thought he might not get to him as they don't come back in this ground.
"He's got to step into proper Group company now. He could come back here for the Sky Bet Stakes."
Varian himself watched the race at Newmarket, from where he added: "He's been a grand servant over the years and it is lovely to see him win a big one. I was glad there was not rain at York earlier in the week, because he needs top of the ground.
"I'm not sure what we'll do next as handicaps are out of the question now - he won off a mark of 111, so we will have to see what suitable Pattern races there are.
"A mile and a quarter on fast ground seems to be ideal for him, but I am delighted to see him win a race like that - he deserves it."
Jockey Kieren Fallon was stood down for the rest of the day after hurting his wrist in a fall when Tarikhi suffered a heart attack and collapsed shortly after the winning post having finished unplaced.
"The vets were quickly on the scene. The horse suffered a ruptured aorta and the vets tell us he would have suffered no pain," said York spokesman James Brennan.
"Kieren banged his wrist as the horse came down. I don't think it's anything serious but enough to keep him out for the rest of the meeting."