Watch Alonso's pole lap for the Singapore GP
Ferrari's Fernando Alonso will start the Singapore Grand Prix from pole position after producing a superb performance in final qualifying.
The Spaniard headed Red Bull's Sebastian Vettel, with McLaren's Lewis Hamilton third fastest.
Hamilton's team-mate Jenson Button made it an all-McLaren second row, while Red Bull's championship leader Mark Webber could only manage fifth.
Ferrari's Felipe Massa failed to record a time and will start last.
It was a outstanding effort from Alonso after he was forced to pit in the second qualifying session with an engine mapping problem that restricted him to only one fast lap in that period.
Vettel, who had been expected to take his eighth pole of the season, could not match either of Alonso's two final flying laps.
Given Alonso has already said that pole position is '90%' of the race at the Marina Bay Circuit, the former world champion must now be confident of following his win in Italy with a second consecutive success.
Singapore GP qualifying - top three drivers
"Yesterday in free practice we saw Red Bull in very good form and we expect them to be first and second, so it is a nice surprise," Alonso said.
"We know how important it is to be on pole in a street circuit but we know anything can happen - safety cars, the start, the rain, many factors and we need to control all of them.
"Obviously as you saw it was not an easy qualifying session, and we were not 100% confident on some of the corners in practice, but by the time Q3 came about, I could push harder and both my tyres worked really well.
"I was quite happy with my lap, I didn't know if it was good enough for pole but we got 100% out of the car today."
However Vettel is anticipating a strong performance in the race.
"It was a pretty messy qualifying for us, I never really got into the rhythm," admitted the German.
"In the first run [in Q3] I misjudged the gap to the car ahead, after four or five corners I was already in the back of Michael [Schumacher].
Alonso 'surprised' to take pole
"In the second run, I had a good lap, but in sector two, turns 11, 12, 13, I slightly hit the wall in that section and lost some time. I could make it up in sector three, but not enough.
"I think we had the car to be on pole, but we are on the front row and have a quick car and we should have a strong race."
Hamilton also said he was not discouraged. "To be only a couple of tenths from pole is a good position, we can fight for a win from there.
"I am on the right side of the grid, the car is working well and hopefully that continues into tomorrow and puts us in a good position. No doubt it's going to rain, but we're quick in all conditions."
Button was also hopeful for the race.
"I'm reasonably happy, it was certainly much better than my qualifying here last year," he said.
"The key is the start, and my biggest issue is I have a car the same as mine just ahead of me.
Singapore GP - Qualifying highlights
"But the Red Bulls haven't been starting too well recently, so we'll see what happens."
Webber admitted he has been struggling to find a rhythm around the street circuit.
"I knew the front row was going to be very competitive today, so I'm a bit disappointed to be off the second row," said the Australian.
"But I couldn't have done a lap to get on the front row, so it could be worse - could be better - we keep hanging in there. It's a long race tomorrow, we'll see how it goes."
Data from final practice earlier in the day suggested the damp track conditions meant it was taking longer than usual for tyres to deliver the best times, whatever the compound.
The sight of Schumacher, on soft tyres, going sideways through Turn Two on his first flying lap in Q1 made it apparent the Marina Bay circuit was still not completely dry.
The initial runs confirmed the impression gained from practice that the Red Bulls were faster than the McLarens, with the main question being whether Alonso could get into the mix with the Red Bulls.
There was some early bad news for Ferrari when Massa's car stopped on track before the Brazilian had set a lap-time, meaning he will start from the back of the grid. The team's initial reaction was that the car had suffered an electronic problem in the gearbox.
When the session re-started Alonso recorded an impressive 1.46.541 to lead from Vettel, Webber and Renault's Robert Kubica. Button was sixth, Hamilton ninth, the McLarens separated by Jaime Alguersuari's Toro Rosso and the Williams of Rubens Barrichello.
Those dropping out alongside Massa were Timo Glock (Virgin), Heikki Kovalainen (Lotus), Lucas Di Grassi (Virgin), and the Hispania drivers Christian Klien and Bruno Senna. That Klien, in his first drive in the car, was faster than Senna, was not good news for the Brazilian.
Alonso himself had problems at the start of Q2, reporting mapping problems with his engine. Despite his arguing he needed to get in a banker lap, Ferrari chose to pit immediately to re-programme the F10.
Vitaly Petrov hit the wall at Turn 5, putting him out, but at the front end Hamilton, on hard tyres, put in a superb 1.46.042, briefly the fastest-ever lap around Singapore.
Vettel was four-tenths slower, Button six-tenths, as Alonso re-emerged - and immediately dipped below 1.46. So too did Vettel, on soft tyres, with 1.45.561.
Those dropping out at the end of Q2 were the Force Indias of Vitantonio Liuzzi and Adrian Sutil, Nick Heidfeld, Sebastien Buemi of Toro Rosso, Petrov, a plainly furious Nico Hulkenberg of Williams, and Alguersuari.
Vettel mistimed his first flying lap in Q3, coming up on Schumacher and leaving himself back in seventh. With a single lap remaining, Alonso was top, from Hamilton, Webber and Button, with Barrichello and Nico Rosberg forming a provisional third row.
But Vettel could not find the lap he wanted, while the consistent Alonso produced two superb laps to confirm a deserved pole.