SEPANG, Malaysia (AP) — Lewis Hamilton took pole position for the Malaysian Grand Prix on Saturday, while Mercedes' run of nine straight front-row lockouts in Formula One came to an end as Ferrari's Sebastian Vettel qualified second.

A drenching thunderstorm delayed the final part of qualifying but even a wet track could not prevent Hamilton topping the grid with a time of 1 minute, 49.834 seconds at Sepang International Circuit.

Vettel was second, only seven hundredths of a second off Hamilton's time as Ferrari showed it could challenge Mercedes in Sunday's race.

Nico Rosberg was third for Mercedes while Red Bull driver Daniel Ricciardo qualified fourth.