Arrogate ran California Chrome down in the shadow of the post to grab the Breeders' Cup Classic at Santa Anita.
Dubai World Cup winner California Chrome set easy fractions in front and Victor Espinoza looked to have matters under control as he went for home.
Art Sherman's superstar opened up a gap on the Khalid Abdullah-owned Arrogate, but the young pretender would not be denied under Mike Smith, to give trainer Bob Baffert a third Classic victory in a row.
Baffert said: "I was a bit worried, he was just loping around. I thought 'man, I hope I have him fit enough'.
"I thought there was no chance turning for home that he could catch Chrome - Chrome is such a great horse. It takes a lot to get me excited and that was some race.
"That last 20 yards (I thought we had a chance). This horse is just learning how to run and what a great race.
"I'm just glad I'm at the top end of it, California Chrome is a champion. I'm surprised I beat him, I didn't think I could beat him going in."
Sherman was gracious in defeat and pointed towards the Pegasus World Cup invitational at Gulfstream Park in January as being the final race of California Chrome's career.
He said: "I'm very proud of the way he ran and there are no excuses. What can I say, he ran his eyeballs out.
"This was really a great race. He will be back for sure."
Espinoza said: "I am so proud of him, he ran a great race. Maybe in hindsight I should have let him roll a bit earlier. We have had our ups and downs, and I know what it's like to be down and then come back.
"He was cruising, but we've probably met a good horse today."