Dettori and champion jockey Jim Crowley were locked together in a thrilling finish to the mile heat and it was the Italian who got the verdict.
Westerland (13-8 favourite), trained by John Gosden, was a short-head in front at the line with the four other runners well beaten off.
Dettori said: "He's hit the crossbar a few times and has finally got his head in front again.
"The cheekpieces helped."
Gosden said: "Khalidi won this last year, it's a nice nursery but it wasn't a very big field.
"I'm very pleased with him, we had to put the cheekpieces on him and I'm pleased he did it.
"They just helped him as I think he was a touch keen early but he's gone and won his race giving 2lb to the second, so that's great."
Select any odd to add a bet