Daniel Ricciardo will start his Red Bull from third on the grid behind the two Mercedes drivers in Sunday's Hungarian Grand Prix.
In a two-hour qualifying session hampered by rain, Ricciardo was in with a chance to push for a front row spot until a spin from Fernando Alonso compromised the Australian's final flying lap.
More Sport Videos
Plays of the Week
From flying timber to toe pokes, these are the most exciting, silly and downright crazy plays in the sport world this week.
Mercedes world champion Lewis Hamilton was also forced to slow for the yellow flag allowing his teammate Nico Rosberg the chance to grab pole position.
While disappointed at missing his chance to finish higher, Ricciardo said he was encouraged by how close his car was to pole despite more bad luck.
Asked if he'd got the most out of the car he said: "I think yeah, the maximum I don't know? We got hurt by the yellow as well.
"I was pretty angry on that last lap because I was up a bit and i think it would have put me close to pole. It would have been interesting without that yellow so I'm a little disappointed because of what could have been, but at the same time the session went really well.
"I think in all conditions we were competitive and yeah it was crazy, you had to adapt quickly."
Ricciardo had a scare in the final session when his car hit a puddle of water on the final corner, but unlike other drivers who crashed earlier in the session as the track conditions changed he was able to maintain control.
![Leading trio: Top three qualifiers Nico Rosberg, Lewis Hamilton and Daniel Ricciardo.](/web/20160725141702im_/http://www.smh.com.au/content/dam/images/g/q/c/f/m/h/image.related.articleLeadwide.620x349.gqcfg4.png/1469340444498.jpg)
"Even just little things like getting out of the pit lane on the slick tyre when it was so wet was (hard). I was sideways coming into turn one and whatever," Ricciardo said.
"So it was fun, it challenging and then on the last corner I think it was in Q3 there was a little wet patch still on the curb and I think it sucked me in and I think it was when I opened up DRS as well and I was in for a bit of a ride. But in the end, I survived."
![Wet and wild: Daniel Ricciardo driving the Red Bull Racing Red Bull-TAG Heuer during qualifying for the Formula One ...](/web/20160725141702im_/http://www.smh.com.au/content/dam/images/g/q/c/f/m/9/image.related.articleLeadwide.620x349.gqcfg4.png/1469340444498.jpg)
Ricciardo's teammate Max Verstappen will start fourth and Ferrari's Sebastian Vettel fifth.
Rosberg lapped the 4.3-km Hungaroring circuit in one minute 19.965 seconds, beating Hamilton by 0.143 seconds.
Hamilton was relaxed about the result.
"I don't know how much Nico was up but I got the fastest first sector," he said.
"Bit unfortunate with Fernando but these things happen. I'm not really too disappointed."
The pole was the 26th of Rosberg's career and his fourth of the season.
It was also Mercedes' 46th in the past 49 races, with the German outfit starting all but one race this year from the front.
Rosberg, who agreed a two-year extension to his contract with Mercedes on Thursday, leads Hamilton by one point in the championship.
Torrential rain in the build-up to qualifying forced the start to be delayed 20 minutes.
with Reuters