Leon Haslam took his second victory of the 2015 World Superbikes season, passing Chaz Davies in the final corner to sweep the Losail round for Aprilia.
Haslam tried again and again to make the move stick on Davies throughout the race, but could not get it done for good until the very last turn, recording his first win since the opening round of the year.
Series champion Jonathan Rea took the lead from teammate Tom Sykes off the line at the start, chasing a finish that would let him overhaul the points record set by Colin Edwards back in 2002.
However, he surrendered the lead to Davies into Turn 1 on the second lap and was passed by Haslam into the same corner shortly thereafter.
The top six went on to break away from the rest of the field, but it soon lost one of its riders, with Rea pulling into the pits with a mechanical issue and coming up four points short of Edwards' record.
With him out of the picture, it was all about Davies and Haslam, with the Ducati carrying the advantage through the corners and the Aprilia excelling on the main straight.
On lap 10, Haslam finally pulled off a pass on Davies into Turn 1, only for the Ducati man to retake the lead into Turn 6.
Haslam's next best try, after numerous futile attempts to outbrake Davies, came with two laps to go, as the Aprilia rider overtook the Ducati man round the outside of Turn 1.
However, just as Haslam's teammate and Race 1 winner Jordi Torres fell out of fourth, Davies reclaimed the spot - and then managed to hang on on the main straight win one lap to go, with Haslam running wide into Turn 1.
But Haslam remained stuck in throughout the lap and Davies, focussing on getting the best possible exit out of the last corner, ran wide and allowed his rival to get side-by-side and outdrag him to the line.
Sykes looked to get involved in the fight but eventually brought the bike home four tenths off in third, while Michael van der Mark cruised to a fourth-place finish.
Sylvain Guintoli saw out his Honda tenure with a fifth place, ahead of Leandro Mercado, who recorded his personal-best finish in the series, and Randy de Puniet, who equalled his best result of 2015.
Niccolo Canepa, David Salom and Ayrton Badovini rounded out the top 10.
Alex Lowes' two-year stint with Suzuki fizzled out with a mechanical retirement on the opening lap.
Xavi Fores, who was set to start on the front row alongside the Kawasakis, missed the race due to a virus.
|4||Michael van der Mark||Honda||7.653|
|7||Randy de Puniet||Suzuki||22.468|
|15||Alex Phillis||Kawasaki||2 Laps|
|Ret||Leon Camier||MV Agusta|