Jenson Button made it a 200th grand prix to savour as he grabbed his 11th victory in Formula One by taking the chequered flag at a captivating race in Hungary.
At the scene of his maiden triumph in 2006, Button again proved to be the master of the changeable conditions as light rain early on, and again with 22 of the 70 laps remaining, played havoc.
Button took advantage of an error from McLaren team-mate Lewis Hamilton that proved to be the turning point at a stage when it appeared as if the latter was on course for back-to-back wins.
Instead, it was Button who held his nerve, but with title leader Sebastian Vettel second in his Red Bull the German has increased his lead in the standings to 85 points over team-mate Mark Webber, who was fifth.
After an eventful race that included five pit stops and a drive-through penalty, Hamilton had to settle for fourth behind Fernando Alonso as the Ferrari driver completed the podium.
Over the radio at the end of the race a triumphant Button told his team: "Guys, perfect going into the summer break. Let's come back and win them all."
The constant light rain that had prevailed over the circuit prior to the start of the race conjured an intriguing opening few laps.
It also meant for only the second time in the 26-year history of the event wet conditions played a part, as they did in 2006 when Button came from 14th on the grid to take the win.
But even on the intermediate rain tyres, the track was still like a skating rink once the race began, with the cars twitching from side to side as they fought for grip.
Vettel made a clean start, leaving Hamilton and Button fighting for second through the opening corners, the duo even touching wheels at one stage, but with the former holding sway.
That proved crucial for Hamilton, who capitalised on an error from Vettel as they went through turn two, the German running wide and allowing the Briton to take the lead with ease.
From that point the race was a relatively straightforward one as the first two pit stops came and went with relatively little fuss.
The one exception saw Nick Heidfeld emerge from his second stop in his Renault with his engine giving away before it then caught fire.
Pulling over onto the grass along the pit straight, Heidfeld was forced to make a hasty exit from his cockpit as flames lapped around him.
The race then turned with around 22 laps remaining, just as another light sprinkling of rain coated the circuit, making it slippy in places once more.
On this occasion it was Hamilton's turn to make an error, spinning at turn seven and immediately losing his six-second advantage at that stage to Button.
Foolishly, Hamilton performed a doughnut turn into oncoming traffic to straighten his car, forcing Button to take evasive action to one side, and Force India's Adrian Sutil off track to the other.
As the laps unfolded Button and Hamilton then diced for the lead, which changed hands on a further three occasions.
That was before the 26-year-old opted to switch to the intermediate tyres as the rain had gained slightly in intensity.
It proved to be a bad move as Hamilton pitted shortly after onto the soft tyres, but only after the stewards had handed out to him a drive-through penalty for forcing Sutil off track.
Once that was served Hamilton dropped down to sixth, although after Ferrari's Felipe Massa made a fourth stop for tyres, and conjuring a stunning move on Webber in traffic, fourth was scant consolation.
Ahead of him Button kept his car on the road, yet with Vettel in the mix, he finds himself 100 points adrift with only 200 up for grabs from the remaining eight races.
As for Hamilton and Alonso, they are 88 and 89 down on Vettel who is closing in on back-to-back championships.
Behind the leading sextet, Force India's Paul di Resta produced his best result in F1 to date with seventh.
The Toro Rossos of Sebastien Buemi and Jaime Alguersuari were eighth and 10th, with Mercedes' Nico Rosberg sandwiching the duo.