The Omega Pharma - Quick-Step rider took his second victory of the season ahead of Barry Markus (Vacansoleil-DCM) and Aidis Kruopis (Orica-GreenEDGE).
He also picked up 10 bonus seconds to move up to fourth on GC.
Omega Pharma - Quick-Step led the peloton for long periods leaving the Briton's team-mates incapable of giving him a lead-out in the sprint. Cavendish had to latch on to former Team Sky colleagues Luke Rowe and Edvald Boasson Hagen to launch an attack with 350m to go - and just passed Kruopis on the line.
He was not disappointed with his team's work, however.
"It was really chaotic in the final stages. I lost my last lead-out man and I just had Niki Terpstra taking me into the final kilometres," said Cavendish.
"There were so many lead-out teams. It became chaos. I saw Luke Rowe and Boasson Hagen on the right and I know how good Luke is, so I thought 'that's the wheel I want to be on' and went over.
"With 350m to go, I was 12 guys back and I had to go. Like always, I had the second kick.
"I was really happy with the guys all day. They kept me sheltered. I'm really happy with that."
BMC Racing's Brent Bookwalter retains the lead of the race by six seconds after coming home in the peloton, with Cavendish only eight seconds behind him.
Bookwalter's team-mates Taylor Phinney and Briton Adam Blythe are second and third at six and seven seconds respectively.
Cavendish is not pinning much hope on the overall win.
"Anything can happen in this race. You have to take every day as it comes. I know I can make it every time in the front echelon, but things can happen," he said.
"I'm not saying it's out of the question, but we will see what happens."
Seven riders escaped early on the 143km route, which featured two and a third laps of a triangular-shaped circuit between Al Wakra and Mesaieed.
A breakaway of riders seeking points at the intermediate sprints was caught with 30km to go and Omega Pharma - Quick-Step took control of the peloton.
The final 8km saw several teams push at different times, leading to the chaotic ending.
- Sports & Recreation
- Omega Pharma
- Aidis Kruopis
- Edvald Boasson Hagen