Lewis Hamilton ended Sebastian Vettel's dominant run in Formula One qualifying by setting a track record and wining pole position for the Spanish Grand Prix on Saturday.
Hamilton had a lap of 1 minute, 16.173 seconds at the Circuit de Barcelona-Catalunya, only four hundredths of a second ahead of Mercedes teammate Valtteri Bottas.
Vettel, who won three straight poles, will start third, followed by Ferrari teammate Kimi Raikkonen.
Red Bull drivers Max Verstappen and Daniel Ricciardo were fifth and sixth, respectively.
"I needed this pole. I've not had pole for a while," Hamilton said. "It was very close but I'm very happy. It's important for me to get back into a good position in qualifying, it's usually a strength of mine."
It was a record-extending 74th pole for Hamilton, and the first since the season-opener in Australia.
"It took everything we've got to take pole," the defending F1 champion said. "Ferrari were sandbagging until this afternoon and Valtteri has been driving exceptionally well. It's fantastic for the team to get the front row. This is a good way to start the weekend."
It was the first front-row lock up for Mercedes this season, and 51st all-time.
"I got a decent lap," said Bottas, who was leading in Azerbaijan when a tire blew near the end of the race. "It's a shame it's only four hundredths but for us as a team, perfect result today."
Vettel said he was "not entirely happy" but already expected Mercedes to be strong. He foresaw an "interesting race" on Sunday.
"It will be close," he said. "Anything can happen really, just like the last couple of races."
A good starting position is crucial in Spain as there are not many overtaking opportunities. The winner has come from the front row in 24 of the 27 races in Barcelona.
Hamilton will be trying to win his second race in a row and add to his four-point lead over Vettel in the drivers' standings. Vettel won in Australia and Bahrain, while Ricciardo was first in China and Hamilton triumphed in Azerbaijan.
Mercedes was fastest in all three practices in Barcelona, with Hamilton and Bottas leading the timesheets.
Most teams brought significant updates to Spain, which marks the beginning of the European season in F1.
Kevin Magnussen will start seventh with Haas. Teammate Romain Grosjean is 10th on the grid.
Both Spanish drivers made it to the final qualifying session, with two-time champion Fernando Alonso eighth with McLaren and Carlos Sainz ninth with Renault.
"Everything we bring to the track is delivering the expectations and the lap times we were expecting from them," Alonso said. "So that's a positive thing."
Bumpy warmup session for IndyCar
The final warmup session for the IndyCar Grand Prix was stopped twice because of smoke from an engine and geese.
Scott Dixon posted the fastest lap of the session. He completed the 2.439-mile, 14-turn course in 1 minute, 10.8157 seconds. Pole winner Will Power was second at 1:10.8371.
The first red flag waved when smoke started billowing from the back of Marco Andretti's No. 98 car. A few minutes after practice resumed, the action was stopped when geese appeared in the 12th turn.
Three -time Indianapolis 500 champion Helio Castroneves was forced to sit out the final five minutes because he took the checkered flag twice in the second of three qualifying rounds Friday.