Hamilton executed a scruffy first attempt in the top-10 shootout to fall more than 0.4 seconds behind the Finn, who held provisional pole, but the Briton blitzed his second lap to steal pole position by 0.112 seconds.
It was a strong result for Mercedes after preseason testing suggested the reigning titleholder was as much as half a second off Ferrari’s pace, but Hamilton credited the team’s hard work for the improvement.
“I’m shaking, it was so close out there,” Hamilton said. “Coming from testing… we were hoping of course to be where we are – the guys have been working so hard.”
Valtteri Bottas was sanguine about losing pole after holding such a commanding lead after the first runs, pleased mostly by the improvement made over the course of the weekend.
“We really made some good progress,” he said. “I had a difficult practice three and we turned things around for qualifying… [but] unfortunately not enough for pole.
“Of course I’d prefer to be on pole, but the race is tomorrow, and I’m starting on the front row.”
Third-placed Sebastian Vettel was surprised by his 0.704-second gap to the front, but he may have been perversely pleased after having insisted all winter that rumours of Mercedes’s demise at Ferrari’s hands were greatly exaggerated.
Despite the margin, the German said he was anticipating being much closer during the race.
“I think we can [win],” he said. “We have a good race car and we’re in good form. Obviously Mercedes is the favourite after today, but we’re here to race.”
Max Verstappen qualified fourth for Red Bull Racing, capitalising on a scrappy final qualifying effort from Ferrari’s Charles Leclerc, who ended the day fifth.
Romain Grosjean led Haas teammate Kevin Magnussen in sixth and seventh ahead of rookie McLaren driver Lando Norris, who impressed with eighth place.
Kimi Raikkonen put Alfa Romeo into the top 10 in its first Formula One appearance since 1985 with ninth place, leaving Racing Point’s Sergio Perez in 10th.
Less than one second separated the midfield in Q2, and combined with the setting sun and cooling track temperatures conditions were tricky for drivers seeking to make it into the top 10.
But just as small mistakes characterised the laps of many drivers – Sebastian Vettel had a big run through the grass on his final lap and Nico Hulkenberg’s messy lock-up in the final sector spoilt his best effort – some moments of individual brilliance shone through.
Lando Norris put in a heroic lap to make it through to Q3 for McLaren, and Kimi Raikkonen, ditched by Ferrari last year before finding a home at Alfa Romeo, likewise put his team into the pole shootout.
Renault was hopeful of joining the top-10 fight, but neither Hulkenberg nor home hero Daniel Ricciardo could muster a lap quick enough, confining them to 11th and 12th.
Alex Albon impressed despite falling out of qualifying in 13th; he was more than a tenth of a second quicker than teammate Daniil Kvyat, and the Toro Rosso pair sandwiched 14th-placed Alfa Romeo driver Antonio Giovinazzi.
The first qualifying session of the season was frenetic, reflecting the closeness of most of the field, and with the Melbourne streets improving throughout the 18 minutes as more rubber was laid into the asphalt, it was advantageous to start a lap as late as possible.
It was impossible to guess which five drivers would end their qualification early – excluding teammates George Russell and Robert Kubica, that is, whose Williams car was around four seconds off the pace and guarantee them 19th and 20th respectively on the grid.
The battle to avoid being one of the three midfielders to miss out on progression was fierce, and when the chequered flag fell Racing Point’s Lance Stroll, Red Bull Racing’s Pierre Gasly and McLaren’s Carlos Sainz were eliminated, their three diverse teams reflecting how tight the midfield competition is in 2019.