Hamilton had been off the pace all weekend in practice but his Mercedes stormed back in qualifying to set a lap record of 1min 30.076sec, a whisker ahead of Ferrari’s Kimi Raikkonen.
“We had no idea what was going to happen today,” said Hamilton, who had endured a torrid Friday as his Mercedes took a dislike to an aerodynamic upgrade package and he finished sixth in both practice sessions.
Hamilton and his mechanics opted to strip the car of the updates for Saturday and it did the trick.
“I don’t really know where the pole lap came from, I surprised myself,” admitted Hamilton.
“Somehow we managed to turn it around and it is a real surprise to be up here with these guys,” added Hamilton, who secured his ninth pole of the season at the last-ever running of the race.
“I’m very grateful to the team. The car felt good.”
Vettel’s world championship hopes suffered a huge blow when he lost drive leaving his Ferrari without a completed lap in first qualifying.
He will start at the back of the grid despite being consistently quickest during practice.
“It feels like I have no turbo,” he said over team radio as he crawled back to the pits in his first qualifying stint.
– ‘The race is tomorrow’ –
Vettel’s engine had already been changed to a new one before qualifying after a similar gremlin in final practice Saturday — only for the new unit to fail.
“Who knows what will happen tomorrow,” said Vettel, who is 28 points behind Hamilton in the drivers’ championship.
“The race is tomorrow not today. We have a very quick car and we saved some tyres.
“If it happened tomorrow it would be more of a problem. Anything can happen — you saw that in Singapore two weeks ago how everything can change.”
In Singapore, Vettel had started from pole only to crash on a rain-soaked first lap as Hamilton won from fifth on the grid to extend his championship lead.
Raikkonen was a first-bend casualty in the Singapore carnage along with Max Verstappen. “We’ll try to get further than 100 metres on Sunday,” Raikkonen said.
– Birthday boy’s present –
The Finn, who recorded his maiden grand prix win at Malaysia back in 2003, thought he might have pipped Hamilton to pole but was edged out by just four-hundredths of a second.
“When you get that close it’s a disappointment,” said Raikkonen.
“But I know I made the most out of it. You always find some things to improve but the car has behaved nicely all weekend.
“We will try to make sure we do the first two corners well and go from there.”
The Red Bull of birthday boy Verstappen was third, almost half a second behind Raikkonen.
The Dutchman, who turned 20 on Saturday, will be joined on the second row by teammate Daniel Ricciardo who was fourth fastest, just 0.054 seconds slower.
“That was the present I gave Max — half a tenth — that was the present,” laughed Ricciardo.
The Australian sensed an opportunity on Sunday.
“I think in the dry the podium is there, especially with Vettel down at the back,” he said, wary of the ever-present possibility of rain in tropical Sepang.
Hamilton’s teammate Valtteri Bottas will start fifth with the Force India of Esteban Ocon taking a surprise place alongside the Finn on the third row of the grid.
Meanwhile, the organiser of one of the support events apologised to spectators after every car ran out of fuel and embarrassingly failed to complete the race.
The Formula 4 South East Asia Championship issued a statement apologising “unreservedly” for the debacle when all nine cars were left stranded across the circuit after a miscalculation on how much fuel was needed.
Sunday’s Grand Prix will be the 19th and last at steamy Sepang. The race will disappear from the calendar after Malaysia’s government decided it would no longer cover the $67 million a year cost of staging the loss-making event.
Download our app and read this and other great stories on the move. Available for Android and iOS.