SAKHIR, Bahrain (AP) — Lewis Hamilton produced what he called a "sexy, sexy lap" to snatch pole position away from his Mercedes teammate Nico Rosberg at the Bahrain Grand Prix, with a margin of just under eight hundredths of a second on Saturday.

On his first flying lap of Q3, Hamilton ran wide at the final corner to leave him fourth but, under pressure to improve, he was close to perfect in his second lap to make it back-to-back poles to start the Formula One season.

"It's actually the only lap I've put together all weekend, and it was the last one," Hamilton said. "I hope that's the first of many."

Hamilton's pole was in doubt when he was later called to a stewards' hearing, charged with breaching the rules by reversing his car in pitlane at the end of qualifying. However, stewards settled on a reprimand, saying he was not given clear instructions of where to park.

Ferrari's Sebastian Vettel qualified third, followed by his teammate Kimi Raikkonen.

The two Mercedes on the front row and two Ferraris on row two was a repeat of Melbourne, where the scarlet cars accelerated far better with the new single-clutch system enforced by this season's rules, and will be aiming for a repeat on Sunday.

"Ideally, we'll do the same thing at the start as we did two weeks ago," Vettel said. "I wouldn't mind that.

"We know we are not yet where we want to be but step by step we are getting there."

Rosberg, who won the season-opening race in Australia and the final three races of last season, bettered Hamilton's time in each of the three practice sessions in Bahrain, only for that run to end when it mattered most.

"Lewis just did a great lap at the end there," Rosberg said. "My lap felt good and I felt sure I was on pole."

Hamilton remained anxious about the start to Sunday's race, fearing it was unlikely the team had been able to come up with a way to improve on the relatively poor start both cars had in Australia.

"It's a longer run down to turn one here than there was in the last race," Hamilton said. "Whether we have made big improvements, I highly doubt it, but hopefully it's better on my side at least."

Daniel Ricciardo of Red Bull qualified fifth ahead of Williams drivers Valtteri Bottas and Felipe Massa, with Force India's Nico Hulkenberg eighth. Sebastian Grosjean qualified ninth for Haas, and will be the highest-ranked driver with a free choice of tires for the start of the race, while Toro Rosso teenager Max Verstappen completed the top 10.

The rolling elimination qualifying system again produced a dearth of on-track action. In a reverse of Australia, this time it was Q1 and Q2 which suffered from drivers electing to save tires and not try to improve their lap times, while Q3 had a decent climax as the top four cars all came out for a second run.

The format will be reviewed on Sunday in a meeting between the FIA, commercial chief Bernie Ecclestone, team principals, and tire supplier Pirelli. Any change to rules during a season requires unanimous agreement between teams.

Among the eye-catching performances further down the grid, Stoffel Vandoorne — filling in for the injured Fernando Alonso — produced an impressive debut in 12th as he eclipsed his vastly more experienced McLaren teammate Jenson Button, while rookie Pascal Wehrlein was 16th for Manor, ahead of Force India's Sergio Perez and both Renaults.