Button was leading when the expected rain finally arrived on the 22nd lap, despite making a second pit call (the first had been on the 19th lap) to switch from his second set of soft compound Bridgestones to wets. He resumed still in the lead and continued that way until it became clear just how fast Toyota's Timo Glock was going on intermediates after his stop on Lap 22. Button swept back in on Lap 29 for inters, and grabbed the lead back from Glock as the Toyota dived in at the end of Lap 30 for wets.
The conditions had changed again, so in came Button for a third time on lap 31 to go back to the deeply grooved rubber. He resumed in the lead again as Glock battled with BMW Sauber's Nick Heidfeld for second place, and that was when race director Charlie Whiting decided that it was time for the safety car. A lap later, out went the red flag. Confusion reigned.
Up to that point, the Malaysian Grand Prix had been a gripper.
Button made a poor start and was engulfed by Williams' Nico Rosberg, who made a super getaway. Button tried to run round the outside of him in Turn One and lost out also to Toyota's Jarno Trulli, and Renault's Fernando Alonso got in on the act briefly too before Button snatched back third before the lap was over.
Further back, Rubens Barrichello had sprinted up to fifth in the second Brawn car ahead of Ferrari's Kimi Raikkonen, Red Bull's Mark Webber, Glock, Heidfeld and McLaren's Lewis Hamilton.
In the second McLaren Heikki Kovalainen went off the road in Turn Five, while Robert Kubica's BMW Sauber was all but left on the grid and expired on the second lap.
Rosberg pulled away a little from Trulli, who had his hands full with Button, but after the German stopped on the 15th lap and the Italian on the 17th, Button got the hammer down and was able to concede the lead just to team mate Barrichello before taking it back when Rubens stopped on lap 23.
The biggest gamble of the day came from Ferrari. When Raikkonen pitted on the 18th lap they put him on wets early, and it proved a disastrous decision as he lapped 21s slower than Button. Further back, team mate Felipe Massa struggled with Hamilton as the world champion lost out in fights with the Red Bulls of Webber and Sebastian Vettel, who had been the first to pit, on lap 13.
Just before the rain, the order was Button, six seconds ahead of Rosberg, Trulli and Barrichello. Alonso was fifth from Hamilton (both yet to stop), then came Heidfeld and Massa, Piquet and Nakajima, Webber, Glock and Trulli who had all stopped, Raikkonen, and then the Toro Rossos and Force €ndias.
Then came the wholesale stops on the 22nd lap as the rain came, followed by thunder and lightning and all the drama that had been predicted.
By lap 25 things had stabilised a little as the drivers splashed their way around, and parts of the track became less wet than others. Button was still leading, from Rosberg, Trulli and Barrichello, but Webber was now fifth from Heidfeld after Alonso had briefly fallen off, then came Hamilton, Glock, Massa, Piquet, Nakajima, Vettel (also, like Glock, flying on inters), Alonso, Raikkonen et al. But conditions were still so tricky that many decided to change to inters, only to find, as Button did, that wets were the answer after all.
When the red flag came out on lap 32, the order read: Button, Glock, Heidfeld (a long way behind after a spin), Trulli, Barrichello, Hamilton, Rosberg, Webber, Massa, Bourdais, Alonso, Nakajima, Piquet, Raikkonen, Sutil, Vettel, Buemi and Fisichella (who had spun twice).
That was when the guessing began. Would they restart the race, as the rain eased but the sky became darker with the onset of evening? If not, when would they backdate the result, because of all the pit stops?
At 18.52 the race directors finally called it off. Button had won, it was just a matter of deciding how far they would go back to decide the order behind him. In the end, that was lap 31, giving a race finishing order of:
Button, Heidfeld, Glock; Trulli, Barrichello, Webber, Hamilton and Rosberg as the points scorers. Then: Massa, Bourdais, Alonso, Nakajima, Piquet, Raikkonen, Vettel, Buemi, Sutil and Fisichella.
Since the race had gone past the 50 percent mark but not 75 percent, half points were awarded. But for Button, it was the chance to extend his championship lead from 10 points to 15, with Barrichello next on 10 from Trulli on 8.5. In the constructors' championship, Brawn have 25 to Toyota's 16.5.