Lewis Hamilton took a controlled win in the Bahrain Grand Prix as team-mate Nico Rosberg was beaten to second by Ferrari's Kimi Raikkonen.
Hamilton led from the start and was always in control as he took his third victory in four races this season.
Rosberg battled the Ferraris throughout and lost second to Raikkonen with a braking problem with two laps to go.
Ferrari's Sebastian Vettel wrecked his podium chances by going off track and damaging his car while racing Rosberg.
Raikkonen, who nipped past Rosberg at the start of the penultimate lap when the German ran too deep into Turn One, put in an impressive drive on an alternative tyre strategy to move up from fourth place on the grid.
But Hamilton was out of reach at the front under the lights at the Sakhir track on a windy desert night.
Mercedes had expected a challenge from Ferrari during the race but Hamilton, after converting pole position into a lead at the first corner, was always in control as he set about building a lead while also protecting his tyres.
Rosberg, meanwhile, dropped to fourth at the start from third place on the grid but set about quickly dispatching the Ferraris, passing Raikkonen on lap four and Vettel four laps later.
Hamilton was nearly six seconds clear of Rosberg and a further two ahead of Vettel when the lead Ferrari made its first pit stop on lap 13.
Mercedes had to respond with Rosberg, but still failed to prevent Vettel getting back into second. Rosberg, though, passed Vettel to take second again at the start of the next lap.
The two laps between Vettel's first stop and Hamilton's meant that the world champion rejoined the track with Rosberg and Vettel right behind him, prompting Hamilton to ask: "What happened to my lead?"
The answer was that Hamilton had had a slow pit stop, and fresh rubber had allowed Rosberg and Vettel to make up time - known as the 'undercut'.
After that, Hamilton again steadily built his lead until the second pit stops, Mercedes this time stopping him first to ensure there was no threat from behind.
Ferrari again 'undercut' Rosberg with Vettel, stopping two laps earlier, putting the four-time champion back into second.
But Rosberg rejoined right behind Vettel and, under pressure, the Ferrari driver ran wide at the last corner, making Rosberg's pass easy.
The incident damaged Vettel's front wing and he had to stop on the next lap for a new one, putting him into fifth place behind Williams's Valtteri Bottas.
Rosberg's attention now switched to Raikkonen, who in the middle stint had run the 'medium' tyre that Mercedes saved for the end of the race, preferring to do their first two stints on the 'soft'.
Raikkonen drove a strong middle stint on the slower tyre, holding the gap to Hamilton and was five seconds ahead of the German when he made his final stop on lap 40.
He rejoined with a 15-second deficit to Rosberg and 17 laps to go on the faster 'soft' tyre.
He was just over a second behind Rosberg as they entered the penultimate lap when the German suffered a partial brake failure entering Turn One. Rosberg ran wide, allowing Raikkonen to pass him on the exit of the first corner.
Team boss Toto Wolff said the problem was caused by overheating, which caused a failure of the brake-by-wire system, and that Rosberg was helpless. The same problem affected Hamilton at the same time, Wolff said.
Behind the top three, Bottas managed to hold off Vettel for fourth despite heavy pressure in the closing laps.
Red Bull's Daniel Ricciardo took sixth despite his engine exploding as he headed for the finish line, ahead of the Lotus of Romain Grosjean and Force India's Sergio Perez.
The final two points places were taken by Red Bull's Daniil Kvyat, who drove well to rise up from 17th on the grid, and the Williams of Felipe Massa, whose car lacked downforce as a result of damage sustained in a collision with Lotus's Pastor Maldonado on the first lap and slipped slowly backwards in the closing laps.
Fernando Alonso just missed out on McLaren-Honda's first points with 11th place, fending off Felipe Nasr's Sauber in the closing laps.