The race was punctuated by two red flags, the first caused by a pile-up on the pit straight, the second by a high-speed crash for Lance Stroll.
In one of the most dramatic races for years, six cars had retired before a lap of racing had completed.
Red Bull’s Thai-British driver Alex Albon took a maiden podium in third.
Hamilton’s win was his sixth in nine races this season and, coupled with a fastest lap secured on the penultimate tour, it extended his championship lead to 65 points as the season passes half way, and puts him just one behind Michael Schumacher’s all-time record of wins.
At the pre-race anti-racism demonstration, as he did his post-race interviews, and on the podium, Hamilton wore a T-shirt saying: “Arrest the cops who killed Breonna Taylor.”
It refers to one of a number of controversial cases in the US in which police officers have shot and killed black civilians.
What caused the huge pile-up?
Amid the sequence of incidents and crashes, the victory hinged on three standing starts between the Mercedes drivers.
In the first, Hamilton got away poorly from pole position and lost the lead to Bottas, but racing lasted only three corners because of a crash between Kimi Raikkonen’s Alfa Romeo, Alpha Tauri’s Pierre Gasly and Haas driver Romain Grosjean.
The incident also took out Red Bull’s Max Verstappen, who had been struck by engine problems as he accelerated away from third on the grid.
That led to a safety car, and at the re-start, as Bottas bunched up the field down the pit straight, there was a massive crash towards the back of the field.
Haas’ Kevin Magnussen accelerated and then slowed, he said because of cars doing the same in front of him. Williams driver Nicholas Latifi swerved to avoid him and Alfa Romeo’s Antonio Giovinazzi then cannoned into Magnussen.
McLaren’s Carlos Sainz then hit the back of the cars of both Giovinazzi and Magnussen, pitching the Alfa 90 degrees into the air before it came down on all four wheels.
How Hamilton got the lead
At the re-start, the positions of the Mercedes drivers was reversed. Hamilton drafted Bottas down to Turn One and took the lead around the outside, controlling the race from there.
The Mercedes drivers disappeared off into the distance and appeared untroubled, but Bottas developed problems with excessive wear of his front tyres and began to drop dramatically away from Hamilton.
Bottas had to pit earlier than expected for fresh tyres. Hamilton followed him in next time around and the two drivers were instructed to stay off the kerbs to protect their tyres.
The race appeared done, but that was counting without another development.
Racing Point’s Stroll was in the middle of a three-way fight for third with Renault’s Daniel Ricciardo in front and Albon behind when his left rear tyre exploded as he entered the second of the two 170mph Arrabbiata corners.
That led to a second red flag, to repair the barrier.
The final part of the race
At the restart, with just 12 laps remaining, Bottas again got away slowly and lost second place to Ricciardo.
But the Finn was able to pass the Renault next time around and secure second place.
That left Ricciardo defending from Albon for third, which would have been the first podium for Renault since they returned to the sport in 2016.
But Albon had too much pace in the Red Bull and passed the Renault with a lovely move around the outside of the first corner with three laps to go to take his maiden F1 podium.
Albon made hard work of the result. Starting fourth, he dropped back to seventh at the second start and had to fight his way back up, which he did with some excellent passes.
Ricciardo took fourth, ahead of Racing Point’s Sergio Perez and McLaren’s Lando Norris.
Williams driver George Russell just missed out on his first points, finishing 11th, behind Ferrari’s Sebastian Vettel.
Ferrari had a difficult day as they celebrated their 1,000th F1 Grand Prix. Charles Leclerc was running third early on, but dropped down the field, lacking pace and straight-line speed and finished eighth.
Driver of the day
A tough one after such a staccato race but let’s give it to Albon. The start of his second with Red Bull has not been great, and he has come under pressure because of his lack of pace compared to team-mate Verstappen. But he grabbed his opportunity with some typically aggressive and skilled passes and deserved his podium.
A welcome two-week break after nine races in 11 weeks before the Russian Grand Prix, where Hamilton can equal a record some felt might never be broken – Schumacher’s haul of 91 grands prix victories.