Diabolical, with Frankie Dettori in the irons, got the lead at mid-stretch after tracking a very fast early pace. He appeared to be in the clear with a wall of horses comfortably behind him. But Desert Code, a 36-1 long shot, ranged up on the outside and just did get by, winning by 1/2 length.
With Richard Migliore riding for trainer David Hofmans, Desert Code ran the "about" 6 1/2 furlongs down the Santa Anita hillside turf course in 1:11.60.
Desert Code, based in Southern California, finished a fading fifth in his last start over the same course in the Morvich Handicap on Sept. 24. Saturday's victory was his second in seven starts this year and sixth in 19 lifetime trips to the track.
Storm Treasure finished third, 1 length farther back, and Fleeting Spirit was fourth.
Diabolical, owned by Godolphin Racing, had been competing in England and France but had not won since a main-track sprint in March at Nad Al Sheba race track in Dubai.
LGBT community has 'bullied the American people': Bachmann
McPhee, Cokas 'working on their marriage' after affair