The world championship leader produced a lap of one minute, 16.173 seconds at the Circuit de Barcelona-Catalunya to beat his team-mate Valtteri Bottas into second.
Bottas was just slightly slower than his teammate on his final flying lap, and could have had the pole himself.
It should also be a good chance for Red Bull to bounce back after last race's disaster. But because of Botas' late devastation, along with Kimi Raikkonen's second-place finish, Ferrari jumped ahead of Mercedes in the constructor standings.
While Ferrari - in contrast to Mercedes - usually has no problems to extract the best from the softest tyres, today's session seemed to favour its rival.
A change of strategy perhaps for Red Bull then? Leclerc, running in P8, was proving to be a stubborn opponent for Alonso.
UFC 224 Results: Lyoto Machida Uses Karate to Retire Vitor Belfort
On a night packed full of drama, where only two bouts went to the judges decision, the knockout of Belfort was the highlight. It's another fight that could have happened and did not.
Chinese, Japanese trade ministers pledge to enhance cooperation, support free trade
China is also willing to make the next trilateral trade ministers' meeting a success as host of the meeting. Mr Li also announced that China would present Japan with a pair of endangered crested ibises .
Bernardo Silva hopes to break 100-points barrier with Manchester City
Midfielders Phil Foden and Brahim Diaz are now one short with four apiece and could miss out. Aguero, who has scored 199 goals for City, is now sidelined with a knee injury.
But Vettel struggled with tire wear and Ferrari made a decision to bring him in for an extra stop.
Stroll almost hit the tire barriers after going off the track with about a half-hour left in the session.
But Vettel said there was no escaping the fact that Ferrari was simply outperformed by Mercedes in Spain.
It didn't say how many subscribers were affected.
There was no messing around from Hamilton at the start of Q3 as he claimed provisional pole on his first lap and never relinquished the position.
"It's great to get a lot of points for the team today". Hamilton was -0.132 seconds on Vettel in Q3 - which one could argue is a sliver. Excuse me, but this is the team Sir Frank Williams and Sir Patrick Head turned into a force that delivered 114 victories through drivers such as Piquet, Mansell and Prost.
Hamilton said: "The vehicle and myself, I felt that synergy that I hadn't been feeling all year". "This is when we are going to start applying some pressure. I was saying to Valtteri (Bottas) when we get to Monaco we'll be driving around with cold tires because it is not easy to get temperatures up there". The team did an exceptional job. "We have found some pace, there is still a bit more to find, but overall a pretty good end to a Friday".
Alonso has now gone five full years without a race victory.