Hamilton claimed pole position for F1's 2020 Hungarian GP ahead of his Mercedes teammate Bottas and Racing Point duo Stroll and Perez.
Behind the four Mercedes-powered cars came Ferrari, which collected its best qualifying result of 2020 so far with fifth and sixth, as Red Bull could only manage seventh with Max Verstappen, while Alex Albon was knocked out in Q2.
Hamilton set the pace on the first runs in Q3 after both Mercedes and both Racing Point drivers had made it through to the final segment on the medium tyres, which they will all start Sunday's race on.
Bottas needed to close a 0.4s gap on the final laps and although he did improve, Hamilton did likewise and roared to his 90th career F1 pole with a 1m13.443s, with his teammate 0.107s adrift.
The works Mercedes were the only cars able to get under the 1m14s barrier, with Stroll third on a 1m14.377s.
Perez had his first run in Q3 deleted for a track limits infringement at the exit of Turn 4, but he slotted in fourth on his final lap.
Sebastian Vettel beat Charles Leclerc to fifth, with the Ferraris set to be the first of the top 10 runners to start the race on the soft rubber.
It is the first time in 2020 that both Ferraris have made it through to Q3.
Verstappen ended up seventh, almost 1.5 seconds down on Hamilton's best time, after complaining about the handling of his RB16 in the medium-speed corners.
McLaren duo Lando Norris and Carlos Sainz took eighth and ninth, with AlphaTauri's Pierre Gasly rounding out the top 10.
Gasly, who missed all of FP1 with an engine issue, complained of power problems in both of the opening segments, but did not set a time in Q3 after suggesting his power unit would not be able to go further in qualifying as he completed his final run in Q2.
Daniel Ricciardo qualified 11th, unable to beat his first run in Q2 set on the mediums after he switched to the softs, but the Renault driver will nevertheless have free choice of starting rubber for the race.
George Russell was delighted to make it in Q2 for the second race in a row and he equalled his best qualifying result with P12 – the same place he qualified at last weekend's Styrian GP – ahead of the second Red Bull of Alex Albon.
After complaining about the balance of his car throughout practice and qualifying, Albon ended up in 13th, 0.207s behind Gasly's cutoff time in the second segment, and criticising his team after encountering traffic on his final Q2 lap.
Like Ricciardo, Esteban Ocon tried the mediums early on Q2 and although he improved his personal best after switching to the softs he will start 14th and ahead of Nicholas Latifi.
In Q1, Latifi had made it through to make it two Williams cars into the second stage of qualifying for the first time since the 2018 Italian GP, as Kevin Magnussen and Daniil Kvyat could not improve enough in the final laps, which were characterised by significant track evolution and tumbling times that meant all drivers went for a final effort.
Haas driver Magnussen ended up P16, with the AlphaTauri just behind, while Romain Grosjean qualified 18th in the second Haas.
The Alfa Romeo drivers will start last – with all four Ferrari customer cars knocked out in Q1 – with Antonio Giovinazzi ahead of teammate Kimi Raikkonen.
Giovinazzi lost a time early in Q1 – which was topped by Perez and Stroll – for a track limits infraction at Turn 4, the fast left-hand kink at the start of the second sector.
|3||Lance Stroll||Racing Point||1'14.377||0.930|
|4||Sergio Perez||Racing Point||1'14.545||1.098|
|7||Max Verstappen||Red Bull||1'14.849||1.402|
|9||Carlos Sainz Jr.||McLaren||1'15.027||1.580|
|13||Alex Albon||Red Bull||1'15.715||2.268|
|19||Antonio Giovinazzi||Alfa Romeo||1'16.506||3.059|
|20||Kimi Raikkonen||Alfa Romeo||1'16.614||3.167|
|View full results|