DUBAI, United Arab Emirates — Country Grammer provided Hall of Fame trainer Bob Baffert with victory in the $12 million Dubai World Cup on Saturday.

Ridden by Frankie Dettori, Country Grammer pulled ahead of favorite Life Is Good a half furlong from the finish and won by about two lengths on the 1 1/4-mile course at Meydan.

Hot Rod Charlie was second and Japan’s Chuwa Wizard, last year’s runner-up, edged Life Is Good for third.

Life Is Good got off to a fast start and led the field into the home turn but faded as Dettori’s well-timed challenge paid off.

Country Grammer, owned by Los Angeles-born Saudi investor Amr Zedan, was the runner-up at the Saudi Cup in February after a nine-month layoff.

It’s the fourth Dubai World Cup victory for Dettori.

Baffert was handed a 90-day suspension by Kentucky racing officials for a failed post-race drug test by Medina Spirit that led to his disqualification as last year’s Kentucky Derby winner.

Baffert’s attorneys argued in a Kentucky court last week that the suspension should not be imposed until he has had a chance for an appeal hearing with the Kentucky Horse Racing Commission. That hearing is scheduled for April 18.