The Brit took the lead on the first lap and commanded the race from then on, managing the gap to Rosberg perfectly.
Pole-sitter Rosberg didn't have the easiest start to the race, loosing out to Hamilton and Ricciardo at the first turn. He re-passed the Australian at the next corner but Hamilton had already began to build a gap.
After the first round of pit stops Rosberg applied the pressure on Hamilton throughout the race but Hamilton responded every time, building a gap to the German every time he got close. He also built a bigger lead when he was warned that the team would be pitting Rosberg first during the second round of stops, despite the fact he was behind Hamilton.
Ricciardo was a strong third, often running the Mercedes' drivers close in the first half of the race. Ultimately, he had to fend off fourth place finisher Sebastian Vettel for the final podium spot.
The pair made contact on lap 57, with Raikkonen damaging his front wing after Verstappen appeared to make more than one change of direction when defending into turn two. No action was taken in the incident and Raikkonen quickly closed back up to the young Dutchman, but despite his best efforts he couldn't find a way past.
McLaren's Fernando Alonso finished the race in seventh, a stark contrast to team mate Jenson Button who had a "race from hell", suffering a hydraulic problem after just five laps. He was then hit with a drive through penalty due to an unauthorised radio message relating the the issue. He was later told to retire the car due to an oil leak.
Haas' Esteban Gutierrez again missed out on scoring his first points for the American team, finishing in 11th ahead of Sergio Perez whose race was ruined by a botched pit stop where his team weren't ready or him to come in.
Jolyon Palmer's tough maiden campaign continued with a 13th place finish. He was set to score his first points in F1 but a spin at turn four ended his top 10 hopes. He did however manage to finish ahead of Renault team mate Kevin Magnussen for the fourth time this year.
The Dane finished in 15th, with Romain Grosjean splitting the Renault drivers.
Daniil Kvyat, Felipe Nasr and Felipe Massa - who had a steering issue prior to the start of the race - finished in 16th, 17th, and 18th. Despite his retirement, Button was classified in 19th, ahead of Pascal Wehrlein, Marcus Ericsson and Rio Haryanto.
Lewis Hamilton's victory sees him move into the lead of the championship for the first time this season. The former McLaren driver had closed a 43 point deficit to Nico Rosberg to just a single point prior to this race, and will now head to the German Grand Prix next weekend with a six point lead in the drivers' championship.
Daniel Ricciardo moves up to third in the points, with Kimi Raikkonen relegated to fourth. Sebastian Vettel is four points back from his team mate with Max Verstappen remaining in sixth.
Bahrain International Circuit - Winter testing