Nico Rosberg expressed his delight as he edged out Mercedes team-mate Lewis Hamilton to take pole position for the Hungarian Grand Prix.
Rosberg trailed Hamilton after the first runs in Q3 but the Briton was compromised when Fernando Alonso spun at Turn 9 and he had to back off.
Alonso's car had been cleared by the time Rosberg arrived on the scene and he was able to continue, moving ahead of Hamilton in the overall classification.
"That was a pretty exciting qualifying session," said Rosberg.
"It was crazy conditions in the beginning with all the rain and the big puddles and a lot of cars went off.
"My car felt very good in the wet - but when it dried out that was the best situation for us as we know the Red Bulls are strong in the wet. I gave it everything at the end of my last lap and it worked out.
"A big thanks to the team, as it was a great team effort to make sure I always had good track position. It's a great feeling to be on pole here in Hungary.
"Tomorrow it will be a big battle against Lewis and the Red Bulls, so I look forward to that."