Mercedes driver Lewis Hamilton edged out Ferrari's Sebastian Vettel in qualifying on Saturday to claim pole position in the Chinese Grand Prix.
Hamilton, beaten by Vettel in the opening race of the Fomula One season in Australia two weeks ago, pipped the German by two tenths of a second in Shanghai.
The Briton's Mercedes team-mate, Valtteri Bottas, took third on the grid, with Kimi Raikkonen in the second Ferrari completing row two for Sunday's race.
Hamilton jumped onto the pit wall to soak up the adulation of the crowd after clocking the fastest lap of one minute, 31.678 seconds to earn his fourth Chinese pole in five years.
Hamilton: "We had to pull out all the stops"
"We knew it was going to be close and we had to pull out all the stops," said Hamilton, forced to play second fiddle to Vettel in the third practice session earlier in the day.
"The Ferraris have looked so fast but I managed to just chip away. It's exciting for me because we really fight with these guys," added Hamilton, who has won the Shanghai race on four previous occasions.
"That's what racing is all about. It really pushes you to raise the bar each time you go out there."
Vettel: "I don't believe that, it was the perfect lap"
Vettel was left incredulous. "I don't believe that, it was the perfect lap," said the four-time world champion, who continued the rich vein of form that saw him draw first blood in Australia.
"Maybe I chickened on the brakes slightly on the last lap. But I think we can still improve, so let's see what the race looks like tomorrow. Conditions will be different."
The signs point to another furious battle between Mercedes and Ferrari but with rain forecast for race day, Red Bull's Daniel Ricciardo could fancy his chances after qualifying fifth.
Team-mate Max Verstappen gets an unwanted opportunity to test the theory that overtaking has become harder in the new wider Formula One cars after only qualifying in 19th.
But all eyes will be on the front two rows after an absorbing tussle which suggested Vettel's Melbourne was no fluke and that Ferrari are ready to end the stranglehold Mercedes have exerted over the sport for the past three years.
"We will see tomorrow how important being on front row is," shrugged Vettel, whose only victory in China came in heavy rain in 2009. "Our car is strong, no matter what."
Ricciardo, whose home race ended prematurely, will start alongside Felipe Massa on the third row after the Brazilian clocked the sixth fastest time for Williams.
Behind them, Renault's Nico Hulkenberg edged out Sergio Pérez's Force India for seventh with Daniil Kvyat's Toro Rosso and Lance Stroll's Williams rounding out the top 10 places on the grid.
Alonso content with 13th on the grid
Very much in the shop window for 2018, Fernando Alonso appeared happy after steering his underperforming McLaren to 13th as the former world champion told his team radio: "I pushed like an animal!"
There was a hairy moment at the end of the first qualifying session when Antonio Giovinazzi smashed his Sauber into a wall on the pit straight, although the Italian walked away from the wreckage unhurt.