Lewis Hamilton starred on Saturday to snatch pole for Formula 1's final Malaysian Grand Prix from Kimi Raikkonen by a whisker.
The Silver Arrows went into qualifying on the back foot after struggling in free practice, but ultimately Lewis' first lap in Q3 was good enough for pole, edging out Raikkonen's Ferrari by a mere 0.045s.
It is the 70th pole of Lewis' career, his fifth at the Sepang International Circuit and ninth of the 2017 campaign.
"We had such a difficult day yesterday; it was difficult to know where we stood," said Lewis. "I didn't sleep very well last night, just like all my engineers, because we didn't know whether we were going to fix the issue or not.
"But today we arrived and the car was much better. The Q3 laps, particularly the first one, were very well put together. To be honest, I didn't really know where it came from. So it's a bit of a surprise to be on pole, but I'm very grateful.
"It's always a special thing when you're able to extract a little bit more out of the car. That's what I've always enjoyed since my dad would say that my first go-kart was fifth hand.
"I don't really know what happened to Sebastian. It's very unfortunate for him, but of course we have to try to maximise on every opportunity that we get. We still have a very tough race ahead of us, so we will keep our heads down.
"Today, every time I left the garage or came back in I could see the crowd and all those flags opposite my garage - I'm incredibly grateful for that and get a lot of energy from it."
Valtteri achieved his best qualifying result in Sepang and will start tomorrow's PETRONAS Malaysia Grand Prix from P5
While Lewis stormed to pole, a disappointed Valtteri had to settle for fifth, behind the two Red Bulls. The Finn ran the latest aerodynamic upgrade package in FP3 and during qualifying, but struggled to match Lewis, who was using a previous specification.
"It's been a difficult weekend for us and we've been quite far behind at times," said Valtteri. "Compared to yesterday we made a step forward; today was a lot better, but still not good enough for me.
"Lewis and I ended up with completely different cars in terms of aero package for qualifying. It seemed to be working for him but not so much for me.
"Qualifying wasn't going too bad until the second session. But in Q3 everyone else could improve quite a bit but I couldn't. We need to analyse everything, it is too early to say why I couldn't improve from Q2 to Q3.
"I'm feeling very disappointed after the qualifying, but tomorrow is a new day. It is going to be a challenge for us; so far, our long run performance has not been great this weekend. But we will try and give it everything we can."
Silver Arrows team boss Toto Wolff praised Lewis' pole effort, especially after a tough Friday, but warned that the Ferraris are still to be feared, even if Sebastian Vettel will start Sunday's race from the back of the grid, due to an engine problem.
"So far this weekend we have seen a pretty confusing picture of performance, with different cars quick at different times and even big gaps between team-mates," said Toto.
"Our struggle has been to get the tyres into the right working window, then things came together this afternoon as the track temperatures cooled.
"After a tough Friday, the team here at the track and back at base did a good, calm job to analyse the situation and come up with some improvements. And then, when it really counted, Lewis was able to put together a blistering lap to take pole - something we didn't expect at all going into qualifying. It was really a great job from him.
"Valtteri found it harder today but it's clear that tiny differences in set-up or tyre temperatures are making a big difference in lap time, and it didn't quite come together in Q3.
"There's no doubt this session was also a tough moment for Ferrari, with Sebastian unable to take part, but there are no points scored on Saturday. They have had the strongest race pace this weekend and will be a serious threat in the race.
"We can't pretend that we have all the answers right now, but we can be pleased with the outcome today and are ready to fight hard in the race."
Trackside Engineering Director Andrew Shovlin is not expecting a walk in the park on race day, with both Red Bulls and the Ferraris showing strong race pace during the running on Friday.
"Our programme today in FP3 was focused on collecting more data about our latest upgrades, running the cars in different configurations to make that comparison," said Andrew. "We collected a lot of information, and will continue to do so during tomorrow's race.
"There was a lot of work done overnight at the factory and the track to try and understand the limitations we encountered on Friday, and propose changes to be evaluated during FP3.
"Both drivers felt we had taken the car in a positive direction and they had more confidence in the handling. However we were not expecting to be on pole today and the fact that we are is the result of a great lap by Lewis; equally, we should recognise it might have been a different story had Sebastian taken part in the session.
"Valtteri had a trickier time this afternoon, his pace was good in the earlier part of qualifying but he was not finding the same track improvement as Lewis and this is another indication that we are struggling to put the car into the right window.
"We are not expecting an easy race, because both Red Bull and Ferrari produced very good long runs, while our car has been difficult to work with on high fuel. It will be a tough challenge tomorrow - but we will approach it with the mind-set of maximising our potential and taking the opportunities that present themselves."