Already forced to fight back when a run-on at turn sixteen hairpin dropped him to ninth place, Melandri looked set to trail Davies in a BMW 1-2 when another mistake with four laps remaining would demote him to fifth.
However, by returning to the circuit just behind the reignited battle for third, Melandri would simply get himself back ahead by the chequered flag to snatch the final spot on the podium.
His recovery would ultimately deny Jonathan Rea a shot at the rostrum, though the Ulsterman would still turn in a decent fourth place finish on the Pata Honda, albeit at the expense of an unfortunate Davide Giugliano, whose Althea Aprilia would slow on the final lap before coming to a halt with just two corners remaining.
Flying the flag for Kawasaki and Suzuki respectively, French duo Loris Baz and Jules Cluzel engaged in their own battle before what became fifth place was decided in favour of the former, the duo finishing well ahead of a lonely Carlos Checa on the best of the Ducati 1199 Panigales.
Picking up a place from Giugliano's retirement, Michel Fabrizio, Leon Haslam and Ayrton Badovini rounded out the top ten, while the 14 race finishers, Max Neukirchner, Federico Sandi, Ivan Clementi and Vittorio Iannuzzo kept it upright to secure themselves some points.