The 29-year-old German outpaced Raikkonen by 0.059 seconds.
Championship leader Sebastian Vettel admitted it felt "fantastic" to lead Ferrari to their first front row lock out in nine years after he took pole position in Saturday's thrilling qualifying session for the Russian Grand Prix.
The four-time world champion's blistering fastest lap and Ferrari team-mate Kimi Raikkonen's second place on the grid brought to an end rivals champions Mercedes long and dominant supremacy in qualifying. The 29-year-old German outpaced Raikkonen by 0.059 seconds with another Finn, Valtteri Bottas of Mercedes, third fastest with less than a tenth of a second separating the top three. Britain's Lewis Hamilton was fourth fastest, the first time Mercedes failed to have a car on the front row for 31 races.
"If you have a rhythm here it feels fantastic," said Vettel, who has won the last nine races at which he started from pole position. "And I am glad I got it back. It is great to have both cars on the front row, but it is only part of the job done. "I knew it would be tight, I knew I would be the first one crossing the line. I got Valtteri's time -- and he did not manage to improve -- and when I got the message I had got it... I was over the moon. "In qualifying, Mercedes have been very, very strong. I am sure it will be very close tomorrow, especially over the long run.
"We will see, but for now we are full, of joy. We are back -- at least if you talk about the front row!" It was Vettel's first pole this year, his second for Ferrari and the 47th of his career. Ferrari also achieved a front row lockout for the first time in 127 races going back to the 2008 French Grand Prix, where Raikkonen took pole. "It's hard to understand how we're going to make it better, said Raikkonen.
- 'Upper hand' -
Vettel's success also brought to an end Mercedes' run of 18 straight pole positions dating back to last year's Monaco Grand Prix. "To be honest, Ferrari have had the upper hand all weekend, but as always Sunday is the day that counts," said Bottas. Hamilton, rarely away from the front row, said he had plenty of homework overnight. "I need to find out what we are missing," said the former three-time world champion.
Australian Daniel Ricciardo was fifth for Red Bull ahead of Brazilian Felipe Massa of Williams, Dutch teenager Max Verstappen in the second Red Bull and German Nico Hulkenberg of Renault. Mexican Sergio Perez was ninth for Force India ahead of his team-mate Frenchman Esteban Ocon. On a warm sunlit day at the Black Sea resort, with a track temperature of 40 degrees Celsius, the opening Q1 session saw Mercedes top the times.
Vettel and Raikkonen were second and third for Ferrari behind Bottas and Hamilton while a late accident saw two cars -- Briton Jolyon Palmer's Renault and German Pascal Wehrlein's Sauber -- go off and into the tyre barriers.
That signalled an early exit for the pair along with Belgian Stoffel Vandoorne of McLaren Honda, Swede Marcus Ericsson of Sauber and grumbling Frenchman Romain Grosjean of Haas. The luckless Palmer had earlier had the engine in his Renault car changed between final practice and the start of qualifying. When Q2 began, Raikkonen was the early fastest man as the teams prepared their tyres -- to be used again on Sunday to start the race -- before Bottas took over top spot in 1:33.264.
The session ended with Bottas ahead of Raikkonen and Hamilton third ahead of Vettel while out went Spaniard Carlos Sainz of Toro Rosso and Canadian rookie Lance Stroll of Williams. Also out went local hero Russian Daniil Kvyat of Toro Rosso, Dane Kevin Magnussen of Haas and two-time champion Spaniard Fernando Alonso in his McLaren Honda. The top ten shootout began with the two Mercedes waiting in the pit lane and then, on a warm-up lap, a bizarre scrap between Hamilton and Hulkenberg, the German appearing to hold up the Englishman.
"He's driving quite dangerously," said Hamilton, while Raikkonen went fastest and Vettel second for Ferrari before Bottas grabbed second. Hamilton, fighting his car for rear grip, was only fourth after the first runs, the Mercedes men clearly affected by Hulkenberg's antics. All four pole-contenders were soon out on fresh rubber for their final showdown -- and Ferrari's takeover at the top.