The Scuderia had been the quickest team all weekend and come race day were comfortably quicker than their rivals.
However, with only a handful of laps to go, new Ferrari driver Charles Leclerc lost power after leading the majority of the race, pushing him back to third.
It will be a disappointing day for the Monegasque after dominating throughout the grand prix, despite picking up his first podium in F1.
Team-mate Sebastian Vettel looked on course to finish second, although ended up in a spin after locking horns with Lewis Hamilton in an enthralling battle between the two world champions.
What looked so promising for Ferrari
The start of the race saw pole man Leclerc get off to a shaky start, struggling to get heat into his tyres which let Vettel lead into turn one, also conceding a place to Valtteri Bottas.
However, a mistake from the Finn on the next lap allowed Leclerc to move back into second and set off after his team-mate.
Hamilton, who had fallen to fourth on the opening lap, was also able to capitalise on Bottas’ mistake, moving back up into third.
Leclerc quickly closed up on Vettel and after a few quick laps convincingly overtook the German – with team orders not playing a part in the fight between the two Ferrari drivers.
Following the first round of pit stops, whilst Ferrari opted to switch their drivers to medium tyres, Mercedes gambled by putting on a new set of soft tyres for Hamilton.
The gamble initially paid off, with Hamilton able to jump Vettel after performing the undercut, although the Brit soon started to struggle on his tyres and eventually fell back into the clutches of the German.
Vettel soon managed to overtake Hamilton and started to build the gap to the Mercedes driver and set about trying to close the gap to his team-mate out in front.
However, after Hamilton switched to the medium tyres in the second phase of stops, the Brit hounded the Ferrari of Vettel, who also switched to a new set of medium tyres.
Hamilton bravely swooped round the outside of the German going into turn four and in an attempt to keep alongside him, Vettel spun and soon after sustained major damage to his car after his front wing came loose on the straight.
A forced pit stop put the German down the order, although he was able to recover to fifth place.
With only a small handful of laps to go, victory looked inevitable for Leclerc, but on lap 46 reported a loss of power from the car and started to lose time to Hamilton behind.
A few laps later the Brit was able to pass Leclerc on the straight, with Bottas soon following after having a quiet race.
Red Bull’s Max Verstappen also started to close on up on Leclerc, but after both Renault cars mysteriously retired at the same time with only three laps to go, a safety car ensured that Leclerc would be able to retain third ahead of the Dutchman.
The Monegasque picked up the fastest lap point, although it is unlikely to be any conciliation for what seemed to be an almost certain maiden win.
McLaren show impressive pace
McLaren had put in a very impressive performance throughout the Bahrain Grand Prix weekend, with rookie driver Lando Norris securing a very commendable sixth place ahead of Kimi Raikkonen.
Pierre Gasly managed to move his Red Bull up to eight after a poor qualifying, with Alexander Albon and Sergio Perez rounding off the top ten.
After a very convincing qualifying from Haas, Romain Grosjean retired from the race whilst Kevin Magnussen struggled, falling from sixth to 13th.