The German was chased home by Ferrari teammate Charles Leclerc, who started on pole but lost the lead to the four-time world champion after making his pit stop, and Red Bull's Max Verstappen, who finished third.
Championship leader Lewis Hamilton finished fourth for Mercedes but extended his advantage over teammate Valtteri Bottas to 65 points with six races remaining after the Finn finished in fifth.