The Mexican Perez is competing alongside the seven-time Mercedes world champion in his second race for Red Bull to get his first start in the front row.
Verstappen, who was the fastest in the last practice session on the Italian circuit and was chasing a pole hat-trick, had to settle for Ferrari’s Charles Leclerc as a strong fourth on a home track for the revitalized Italian team.
Hamilton did enough with his first flight lap of one minute and 14.411 seconds, but Perez came closer in the end with an effort of just 0.035 more slowly.
“I definitely didn’t expect us to be in front of two Red Bulls,” said Hamilton, who won the season opener in Bahrain last month after Verstappen started on pole.
“I think they were so quick that weekend that they were sometimes six tenths ahead.
“I came around the last corner and heard that I got pole and I was super grateful,” added the 36-year-old, who has now raced pole on 30 different tracks.
Perez, who has more than a decade of Formula 1 experience, has been tricked into putting more pressure on Mercedes than Verstappen’s youngest teammates managed and delivered properly.
The Mexican still felt he could have done better.
“I’ve improved, P2, but I should have been on pole and I made a mistake in the last corner,” said Perez, who won last year with Racing Point (now Aston Martin) in Bahrain.
It was the first time that Verstappen had been overtaken by a team-mate under normal conditions since Australian Daniel Ricciardo was at Red Bull’s side in 2018.
“You can’t be good every time so we’ll see what went wrong,” said the Dutch driver. “It’s still P3, which is a good starting position.”
AlphaTauri’s Pierre Gasly qualified fifth, Ricciardo qualified sixth for McLaren and team-mate Lando Norris qualified seventh.
Norris would have been in the front row if his fastest lap had not been deleted because the track limits were exceeded.
Hamilton’s team-mate Valtteri Bottas, who took pole position at Imola last November and was the fastest on Friday, qualified for a disappointing eighth place. Hamilton also faced different tire strategies in Sunday’s race with the Red Bulls.
Hamilton will start with medium tires, Perez with softs and Verstappen also with media.
“Anything can happen, we have a different strategy than Lewis and Max,” said Perez. “It will be interesting to see what we can do.”
The Spaniard Carlos Sainz did not make it to the last shootout in his first race in Italy with Ferrari and starts in eleventh place.
Both Williams drivers reached the second stage for the first time since last July. George Russell still sounded disappointed in 12th place, even though he was ahead of former masters Sebastian Vettel and Fernando Alonso.
Four-time champion Vettel will finish 13th for Aston Martin and Alonso, a 2005 winner at Imola with Renault, on the way to the first of two titles, 15th for Alpine.
The Japanese rookie Yuki Tsunoda was the big victim of the first session, lost control of the Alta variant and hit his AlphaTauri backwards against the wall of the tire.
“It was a big mistake for me and I’m really sorry for the team,” he said. The session was marked in red when the badly damaged car was removed from the track.
The teams, most of which are based in England, were silent for a minute before qualifying.