Both Red Cadeaux and Dunaden were settled near the rear of the field early on as Illo set a steady pace before a crowd of 105,000.
There were plenty in with a chance as the field straightened for home with Manighar kicking for home early before Lucas Cranach went in pursuit. However, Red Cadeaux kept on strongly while Lemaire was challenging between horses on Dunaden.
Dunlop's challenger held a narrow advantage over Dunaden just strides from the post but Lemaire conjured a last rally to gain the narrowest of wins, with Lucas Cranach third and last year's winner Americain fourth.
Lemaire only stepped in for the ride at the last minute after Craig Williams was ruled out of the race through suspension. Williams rode Dunaden to win the Geelong Cup in his prep race earlier this month and Delzangles paid tribute to his efforts.
He said: "I would like to spare a thought for Craig who should have been on the horse today. He did a great job in preparation for the horse and has been a big help.
"They went very slowly in the beginning but on the back straight we started to go a bit faster and I was always confident. The horse in front of me was going really well and it brought me to the front very easily.
"I was a bit anxious after the line. A rider told me they thought I had won and then when I turned the corner back towards the stands, everyone was applauding me. Michael Rodd and I congratulated each other and wished each other luck in the photo-finish.
"Two years ago I had a fall before Arc weekend and I missed winning four Group One races, all because of my collarbone, so I know what it is like to watch in your armchair.
"Craig must be devastated. I hope he recovers quickly. To win the Melbourne Cup in your country is a dream and I hope he will win many more races."