Two-time world champion Fernando Alonso stunned Lewis Hamilton to grab the fastest time in opening practice for the Singapore Grand Prix Friday, driving supremely under lights for the first time.

The British world championship leader was the pace-setter in the first session around the bumpy Marina Bay street circuit and looked to have sewn up the second before Alonso pipped him on the last lap.

The Spaniard hurled his Renault around the track in 1:45.654, 0.098 ahead of the McLaren driver.

It was marginally slower than the 1:45.518 Hamilton drove in the first free practice.

Felipe Massa in a Ferrari, who is one point behind Hamilton in the title race with four Grand Prix left, was third fastest.

Hamilton's McLaren teammate Heikki Kovalainen was fourth with Williams' Nico Rosberg fifth, and BMW Sauber's Robert Kubica six.

Defending champion Kimi Raikkonen came seventh.

Rain pelted Singapore on Friday morning but it had cleared by evening with the track dry and the weather humid as the drivers clocked as many laps as possible to familiarise themselves with the circuit and conditions.

Not everyone found the going easy.

Australia's Mark Webber in a Red Bull became the first Singapore casualty, crashing into the barriers on turn 18 during his fifth lap of the first session.

His front right wheel was mangled but he walked away unscathed, though failed to appear for the second session.

Numerous other cars had close shaves with Rosberg and teammate Kazuki Nakajima both spinning, while Sebastian Vettel, the surprise winner of the last Grand Prix in Italy, lost control of his car twice.

He recovered but could only end 13th.

BMW Sauber's Nick Heidfeld, Renault's Nelson Piquet, and Honda's Rubens Barrichello also had trouble controlling the car with the very tight left-hand turn 18 most problematic, but so was the equally tricky turn seven

Red Bull team boss Christian Horner said everyone had learnt a lot about the circuit.

‘There is very little room for error, the drivers are right on the edge out there,’ he said.

‘It was bumpy and quick in places -- all traits of a street circuit. I think everyone learnt a great deal today.’

Toro Rosso co-owner Gerhard Berger added that it was a spectacular experience, racing after dark and with the grandstands full of people for a practice session.

‘It was a great experience with the lights, very special and made a fantastic show for the spectators,’ he said.

‘I think Formula One can be very popular here.’

Rosberg set the early pace before Hamilton took charge, powering past some of Singapore's most prominent landmarks in 1:46.080 on his third lap.

The 23-year-old kept chipping away at his time, bettering it twice to stay top until Massa sneaked past him with 15 minutes of the 90 minute session left.

It was a defiant signal by the Brazilian who careered off the track at turn 16 and then did the same just minutes later at turn one, forcing him into the pits.

But Hamilton was too good, grabbing back first place with six minutes left before Alonso came from nowhere to prove there is still life in the 2005 and 2006 champion.