Verstappen took a superb pole position on Saturday, the fourth of his career, and started immediately ahead of Hamilton under floodlights at the desert track.
Verstappen got away cleanly while Ferrari’s Charles Leclerc made a fine overtake on Bottas, but lost that position after the safety car came out on lap one.
Hamilton initially gained control of the race by making an earlier tire change than Verstappen, who finally started trimming Hamilton’s advantage and took the lead when Hamilton came in for a second tire change.
Verstappen then made his second change with 16 laps left and had an eight-second gap to make up, but Hamilton had older tires. Verstappen caught him on lap 53 and passed him at the second attempt on turn four — but the joy was short-lived.
“I knew I had run off the track limits,” Verstappen said.
Sebastian Vettel’s Aston Martin debut was eventful as he clipped Esteban Ocon near the end, then accused the French driver of changing his racing line.
Vettel was 15th, one place ahead of Haas driver Mick Schumacher, who made his F1 debut on the track where his father Michael Schumacher won the inaugural Bahrain GP in 2004.
Hamilton is seeking a record eighth world title to move one ahead of Schumacher.
Next up is the Emilia-Romagna GP in Italy on April 18.