The Andre Fabre-trained duo crossed the line in unison, with the front-running Thunder Snow narrowly behind them, but it was Dettori's mount who got the verdict.
Inns Of Court was an extremely unlucky loser as he reared leaving the stalls, costing him a couple of lengths, and was in front just before the line and immediately after it.
Saeed bin Suroor's Thunder Snow tried to steal the race from the front under Christophe Soumillon and with half a furlong to go it appeared as if he had.
However, while Al Wukair was struggling to get to him, Inns Of Court went past on the far side before Dettori managed to get his mount in front right on the line.
Third in the 2000 Guineas at Newmarket to Churchill, Al Wukair has only been seen once since, when behind Taareef at Maisons-Laffitte but he turned that form on its head.
Thunder Snow made a bold bid from the front to add to his Prix Jean Prat success, but ultimately he had no answer to the late thrusts of the Fabre duo.
Dettori said: "He jumped a lot more alert than last time and the pace of the race was slow.
"Andre said to me to try and build it up as he doesn't do anything quick so I decided to attack Christophe (Soumillon, on Thunder Snow) about two and a half out.
"He was playing around a bit, though, and looking around, so I had to get a bit serious with him and then when Mickael (Barzalona, on Inns Of Court) came alongside he felt it was time to go.
"He got a crack off Christophe's whip in his face and I think that woke him up and we flashed past the line together. I wasn't sure I'd won, but it's a great win and he's a good horse. The Jacques le Marois is one of the best races in Europe."
He added: "Obviously the rain helped, I rode him on firm in the summer and he didn't really like that.
"I guess the long-term plan will be the QEII (at Ascot) where he is guaranteed to get softer ground and he likes to go straight.
"A mile and a quarter is within his compass too, and at some stage we'll look at stepping him up."