Heartache got the better of Havana Grey in a thrilling climax to the Wainwrights Flying Childers Stakes at Doncaster.
The Clive Cox-trained Heartache was a brilliant winner of the Queen Mary Stakes at Royal Ascot, but having since suffered defeat in the Prix Robert Papin at Maisons-Laffitte behind Unfortunately, she was on a retrieval mission on Town Moor.
Unfortunately's trainer, Karl Burke, sent Havana Grey into battle for this Group Two contest.
The Molecomb Stakes winner had chased home his stable companion in last month's Prix Morny and punters preferred him to Heartache in the market, with the pair even money and 6-4 respectively.
The five-furlong dash looked a match on paper and that is how it worked out.
Havana Grey and PJ McDonald were in front passing the final furlong marker, but Heartache dug deep for Ryan Moore and got up late on to prevail by half a length.
Moore said: "I think she's done very well. The second is a high-class colt who has finished second in a Morny.
"She needed a bit of waking up to get to him, but she put him to bed quite well.Heartache shrugged off her layoff to bounce back to form on Town Moor (FocusInRacing)
"I think there's more in the locker for this filly and she's not necessarily an out-and-out five-furlong filly."
Cox said: "I was delighted. When they said it was heavy ground at the start of the week the last thing I thought possible was to come and win like this. Obviously it's kept drying and she's done so well from her last run.
"I'm very pleased and proud. Ryan was very impressed by her and said she was just taking it easy and enjoying the last little bit, so it was very good.
"She was muscle sore after the Papin, there was a coming together at the start which is where I think it happened.
"We've got a great team at home who got her back in good nick and she's grown and is stronger, too."
Heartache looks set to step back up to six furlongs for the Juddmonte Cheveley Park Stakes at Newmarket on September 30.
"She'd be better on drier ground, I'd be concerned if it was too soft," the trainer added. "The Cheveley Park is very much on the cards, stepping up to six, as long as it's not too soft." Burke made no excuses for the vanquished favourite.
He said: "I think we've bumped into an improving filly. I saw her in France and for me she looked a bit bigger and stronger today. I said that to Clive before the race and he said she'd grown.
"That was her fourth run, this was our eighth run, so she's entitled to keep improving. "I was half-wondering whether PJ was going to say he didn't quite quicken. When he asked him at the two-pole I thought we had everything off the bridle, including the winner. I thought 'oh we'll nick a length and go and win our race'.
"PJ said he quickened and he couldn't believe the other horse got back to him, so we have no excuses.
"There's no real five-furlong races for him now so I doubt he'll run again this season."
Earlier in the day Aidan O'Brien and Moore combined to land the Japan Racing Association Sceptre Stakes at Doncaster with the consistent Music Box.
The daughter of Invincible Spirit was unraced as a juvenile, but has made up for lost time this season having already run 15 times prior to this Group Three test.
She had managed three previous victories, including a Listed success at the Galway Festival, and had been placed on a further nine occasions.
The 8-1 shot was settled in behind the pacesetters by Moore before launching her challenge on the far side of the track.
The strong-travelling Eternally did her best to bridge the gap closer to the stands side, but Music Box was always doing enough and passed the post a length to the good.
Eternally held on to the runner-up spot from Tomyris, while Talaayeb, the 7-2 favourite, was fourth.
Moore said: "She's a beautiful looking filly, you couldn't wish to see a better one. She's had a busy campaign, but she's thrived on it and she's got a lot of ability. I'm delighted for her today."
Coolmore's UK representative Kevin Buckley said: "We're very pleased with that. Ryan was happy. They went a decent pace and she ran on well on the back of it.
"Her form has been good since Galway, with two Group Three places since, so it was nice to get that one in the bag.
"We'll get her home and see how she comes out of that, let's not forget that was her 16th start since the end of March. She's been a busy girl but she's tough and a lovely looking filly. We'll see how she comes out of it."
Music Box was suspended from running for 42 days after finishing third on her Dundalk debut back in March.
O'Brien was fined €2,000 and jockey Wayne Lordan was banned for five days after being found in breach of a rule that deals with horses having to be seen to run, and ridden, to obtain the best possible placing.
Trainer John Gosden's travelling head lad Tony Procter said of Eternally: "She ran well, but no complaints. We were beaten by a better one on the day."
Roger Varian, the trainer of Tomyris, said: "She ran a solid race. The first four were probably the right four.
"Andrea (Atzeni) said the ground was a bit dead. She travelled like the winner but didn't quite have the turn of foot that she is capable of. We'll see how she comes out of the race. I wasn't displeased. It was a solid run but we're obviously disappointed not to win."