Vettel had the better of Hamilton in final practice but the Mercedes driver made it count in qualifying
Mercedes driver Lewis Hamilton won a tight fight with Ferrari's Sebastian Vettel to take pole position for the Chinese Grand Prix.
Hamilton beat Vettel by 0.186 seconds for his second pole in two races this year. The German edged the second Mercedes of Valtteri Bottas by just 0.001secs.
Ferrari's Kimi Raikkonen made it exactly the same top four on the grid as at the season opening race in Australia.
Red Bull's Daniel Ricciardo was fifth but 1.355secs off the pace.
The Australian's team-mate Max Verstappen was 19th after an engine problem.
China has underlined the impression created by Australia that Mercedes and Ferrari are incredibly closely matched at the start of a season that has seen a huge regulation change producing faster and more demanding cars.
And as in Australia, it was Hamilton who made the difference, pulling out the stops when it mattered in the final qualifying session as it appeared Ferrari might have the edge.
Vettel was fastest in final practice and in the first part of qualifying, and Raikkonen topped the second session.
But Hamilton produced the first lap under one minute 32 seconds all weekend at the start of the top 10 shoot-out, beating Vettel by 0.184secs despite a slide at Turn 11.
Hamilton and Vettel both lowered their times by a little over 0.2secs on their final runs and the Mercedes man kept the advantage.
It was Hamilton's sixth pole in a row, dating back to last year's US Grand Prix, and his sixth in China, where he has won four times, more than any other driver.
But he will know he has his work cut out to beat Ferrari in the race after Vettel's impressive victory in Australia two weeks ago.
The race could well be wet, with overnight rain predicted and cooler temperatures than qualifying, which was dry and bright.
Governing body the FIA has taken steps to ensure that the cars can run after farcical scenes in Friday practice when practice was badly disrupted because the medical helicopter could not operate.
A wet race would be a complete unknown for the drivers - not only did they get hardly any running on Friday but they have not driven these new cars in the wet before this weekend, and Pirelli has designed new wet tyres for this season after complaints the previous ones were not effective enough.
The first session of qualifying ended with a heavy crash for Sauber driver Antonio Giovinazzi.
The Italian lost control coming out of the last corner in the closing minutes of the session, dashing the hopes of Force India's Esteban Ocon, Haas' Romain Grosjean and Renault's Jolyon Palmer of improving and getting into the second session.
Giovanizzi, ironically, qualified 15th - fast enough to get into Q2 but was unable to take part because of the damage to his car.
He was on a lap that was on target to beat team-mate Marcus Ericsson, but even so ended up less than 0.1secs behind the Swede.
Sauber's Antonio Giovinazzi crashed at the end of the first session
"The Ferrari looked so fast and we knew it was going to be close, and we knew we had to pull out all the tops and I managed to do a very, very perfect lap," Hamilton said.
"It started off not as good as the first lap, maybe because of tyre temperature, but it got better and better. It felt strong, and coming into the last corner knowing I was up a couple of tenths, it's always nervous because you want to gain some but you don't want to lose everything you've gained.
"It's exciting for me because we're really fighting with the guys and that is what racing is all about. It pushes you to raise the bar every time you go out, which I love."
Vettel said: "It was a nice session. I enjoyed it a lot. I was very happy with the lap I had. Last corner I lost a little bit, maybe chickened on to the brakes a bit too soon. But we just had enough margin to make it on to the front row."
Red Bull's Max Verstappen, fastest in first practice, went out in Q1 with technical problems
The smog and rain that disrupted practice was absent for qualifying but wet weather is predicted for race day