With inter-team honour at stake, Haslam immediately set about trying to recover his position, but would find himself too close to Melandri in the braking zone for the Esses chicane. Forced to let off the brakes, Haslam went skating across the gravel trap, allowing Melandri to escape his clutches.
Fortunately for him, Biaggi had done something similar in his attempts to pass Sykes, holding both riders up and allowing Haslam to re-join still on the tail of the Kawasaki, while Biaggi was also able to recover in close company.
However, the error had served to break up the lead pack and Melandri commanded almost two seconds over the renewed battle for the podium positions with just four laps remaining. It was all the advantage he needed to complete a repeat of his 2011 victory.
An important moment for BMW after more than three seasons of trying, it is their first victory in 45 rounds and 89 races.
With Melandri away, attention turned to the battle for second, a chasing group that had swelled to four after Jonathan Rea's decision to opt for hard tyres saw him pull more than three seconds on his rivals in less than six laps.
His charge was enough to get him ahead of Biaggi on the final lap, but he would not quite have the measure of Haslam and Sykes, the local man completing BMW's historic day by recovering to second position, ahead of the Kawasaki rider.
Rea took fourth, while Biaggi had to make do with fifth, the Aprilia rider doing just enough to retain the championship lead, though his advantage is now just one point over Sykes.
Further back, Carlos Checa
endured a lonely race in sixth after losing touch with Rea, while his Althea Racing team-mate Davide Giugliano recovered from a lowly grid position to finish a fine seventh.
Going in the other direction, Sylvain Guintoli couldn't maintain his good start as he slipped to eighth, while Leon Camier and Michel Fabrizio
completed the top ten positions on their respective Suzuki and BMW bikes.
A fairly quiet race in the lower half of the field, Ayrton Badovini was 11th, Chaz Davies 12th, Maxime Berger 13th, Jakub Smrz 14th – after running off at the Esses on the first lap – and Eugene Laverty 15th, the Irishman's dismal weekend continuing in the races.