Lewis Hamilton pipped title rival and Mercedes team-mate Nico Rosberg by just seven thousandths of a second after a nail-biting qualifying session for the Singapore Grand Prix.
For once this season there were drivers other than the Mercedes duo in the hunt for top spot on the grid under the lights of the Marina Bay Street Circuit.
Yet come the conclusion it was Mercedes - and Hamilton in particular - who again just had the edge, with the Briton claiming back-to-back poles after starting out front in the last race in Italy.
On the slow-down lap, Rosberg let his frustrations come to the fore as he bellowed “damn it!” over the radio when informed he had lost out to Hamilton.Yet there were occasions throughout the entire qualifying session it appeared as if neither man would be on the front row.
Ferrari had suggested through practice they would be in contention for a crack at pole, further underlining such credentials come the end to the initial 18-minute qualifying session.
Kimi Raikkonen led the way from Fernando Alonso, with Hamilton a quarter of a second back in third and Rosberg a lowly seventh.
Come the end of the middle 15-minute run it was Mercedes back on top with a one-two led by a lightning lap from Rosberg, who finished almost half a second up on Hamilton.
The 29-year-old, however, was forced back out for a second stint on a fresh set of supersoft tyres as his first run in the session left him at risk of dropping out of the top 10.
As Rosberg gave an indicator as to what he and his car were capable of, Hamilton, Alonso, Raikkonen and Daniel Ricciardo all stayed in the garage, so guaranteeing themselves a fresh set of tyres for the race.
Come the first laps in Q3 Williams’ Massa suddenly led the way, with Hamilton and Rosberg in sixth and seventh respectively, leaving them fighting to simply make it on to the front row.
On the second and final hot lap it was Ricciardo in his Red Bull who sneaked ahead of Massa, only to then be deposed by Rosberg, before Hamilton - despite a lock-up at one point that appeared as if it would cost him - had the last laugh.
Ricciardo, third in the championship but 72 points down on Rosberg, finished just 0.73secs behind the German, with team-mate Sebaastian Vettel fourth as he chases a fourth successive win at this circuit.
As for the Ferrari challenge, it faded with Alonso down in fifth and Raikkonen seventh, although the latter was unable to tackle a final lap as he was recalled back to the garage with a power issue.
Sandwiching the Ferrari pair is Massa, with team-mate Valtteri Bottas eighth, while McLaren's Kevin Magnussen and Daniil Kvyat in his Toro Rosso are ninth and 10th.
Hamilton, with his sixth pole of the season and 38th of his career in the bag, described the session as one of the best he could recall for some time.
He said: “To have the last lap at the end like that is always the plan, although it doesn’t always go to plan like it did. On the last lap I locked up in turn one, lost some time, although I made it back in other areas, I kept going.
“It was an exciting qualifying session. I wasn’t expecting to see so many people up there fighting.”
Asked for his thoughts about his radio message and being so close to Hamilton, Rosberg said: “Seven thousandths! When I think back at the lap it’s nothing. But that’s the way it is. Lewis did a good job to get pole. Second is okay, first would be better, but there’s a long race ahead so it’s fine.”
Ricciardo, meanwhile, conceded his car’s pace was encouraging for the race, suggesting Red Bull might be able to push Mercedes on Sunday.
“We came into the weekend thinking if we were within two to three tenths of a second that would give us a chance to stay with them,” the Australian said. “So to end up being closer than we thought, it’s been a good day. It was good fun.
“Hopefully I can keep it up tomorrow and get a better view from the podium.”
Behind the top 10, Jenson Button starts 11th in his McLaren followed by Toro Rosso’s Jean-Eric Vergne.
Force India duo Nico Hulkenberg and Sergio Perez are 13th and 15th either side of Sauber's Esteban Gutirrez, with Lotus' Romain Grosjean in 16th.
At the end of the first session Sauber's Adrian Sutil and Lotus of Pastor Maldonado led the list of casualties, with the duo to line up 17th and 18th.
Jules Bianchi was again the best of the Marussia/Caterham battle and will start ahead of the latter's Kamui Kobayashi, whilst on the back row Max Chilton finished two seconds clear of Marcus Ericsson.