Hamilton drove a brilliant race in awful conditions at Fuji
Lewis Hamilton took a huge stride towards becoming the first man to win the title in his first season with victory in the Japanese Grand Prix.
The Englishman drove a masterful race in treacherous, wet conditions as his chief rival and McLaren team-mate Fernando Alonso crashed out.
Hamilton leads the Spaniard by 12 points with 20 available in the two remaining races in China and Brazil.
Heikki Kovalainen's Renault was second ahead of the Ferrari of Kimi Raikkonen.
Hamilton's performance, his first wet Grand Prix win, was as controlled and impressive as any he has produced in a scintillating season.
And it means he will win the championship in China next weekend if he beats Alonso, or loses no more than a point to him.
"It was awful conditions and, in the end, I was fortunate I was able to finish the race after my collision (on lap 34) with Robert Kubica," said the Briton.
"When you're behind, and especially in those conditions, it is the responsibility of the car behind to be extra careful and I felt that it was a risk Robert needn't have taken.
"Still, I got through it and was able to see it home. It felt like the longest race of my life, what with the safety car coming on twice and the conditions being so difficult, but I'm ecstatic to get the victory."
The pouring rain at one point put the entire event in doubt, with conditions so poor that the race was started under the safety car.
And there was immediate controversy when Ferrari started their cars on intermediate tyres rather than the "extreme" wets that had been demanded by race director Charlie Whiting.
Alonso's crash has all but ended his hopes of the championship
Ferrari said they did not know of Whiting's instructions. They claimed they did not receive Whiting's e-mail until after the start of the race, but, as all the other teams received it, it seems more likely that they either did not notice it until then or ignored it.
The team were given the choice to call the cars in to change tyres or be shown the black-and-orange flag that would force them in, and they chose the first option.
It meant the Ferraris were forced to pit with barely two laps gone, a decision Raikkonen said was "unfair".
In the end, the safety car stayed out for 19 laps before Whiting decided the track was safe enough to race on.
Hamilton quickly built a three-second lead over Alonso, which the double world champion then stabilised until the two men made their first pit stops.
It felt like the longest race of my life, what with the safety car coming on twice and the conditions being so difficult
Alonso, usually outstanding in the wet, came in first, on lap 27, and rejoined in traffic down in seventh place. Hamilton stopped a lap later and came out third.
"It was an unlucky moment," Alonso said. "When I pitted I was behind four cars; when he pitted, he was in front of them."
On new tyres and a heavier fuel load, the two silver cars began to struggle a little, and Hamilton dropped as low as sixth, with Alonso down to 10th, behind rivals who had yet to stop.
Alonso's rear bodywork was damaged when he was hit by Red Bull's Sebastian Vettel and tipped into a spin on his first lap out of the pits.
That will have reduced his car's grip, and the 26-year-old lost control coming out of the tricky and fast Turn Five and smashed into the wall on the entry to Turn Six.
But he refused to blame the damage for the crash: "I aquaplaned and all of a sudden the car was in the wall. I think the aerodynamics were not an important factor."
Alonso's crash brought out the safety car, with Hamilton in the lead ahead of Red Bull's Mark Webber and German rookie Sebastian Vettel in the sister Toro Rosso.
Kimi was probably quicker than me at everything in the final stages... but I really wanted second so I was prepared to take a few risks
But Vettel smashed into the back of Webber while the field was still being controlled, leaving the Australian furious.
Webber was suffering from food poisoning and vomited in his helmet during the first safety-car period, and could not hide his dismay at a potential podium finish being snatched from his grasp.
He swore live on television when first asked about the incident, and later said: "Vettel was a bit wild behind me during the first safety car period and then did a very good job of hitting me very hard under the second safety car.
"I think today he will have learnt a very valuable lesson."
The incident promoted the impressive Kovalainen into second, ahead of Massa, the second Red Bull of David Coulthard and Raikkonen.
Raikkonen passed Coulthard around the outside of Turn Five with 11 laps to go, and that put him just a place behind Massa, who was mathematically out of the title race.
Massa came in for a tyre stop on the next lap, promoting Raikkonen into third place, and ensuring he gained an extra point.
I aquaplaned and all of a sudden the car was in the wall... I think the aerodynamics were not an important factor
The Finn tried hard to pass countryman Kovalainen in the closing laps.
Raikkonen actually passed the Renault on the final lap, but Kovalainen re-passed him immediately and held on to the flag.
"It was a good fight with Kimi," said Kovalainen. "He was probably quicker than me at everything in the final stages and I knew he was really close.
"But I really wanted second so, even though I was aquaplaning at times, I was willing to take a few risks and it meant I could hold on right until the last."
The result leaves Raikkonen 17 points adrift of Hamilton in the championship - still technically within reach, but effectively out of contention unless Hamilton has problems in both remaining races.
Coulthard was fourth, ahead of the Renault of Giancarlo Fisichella, and Massa, who won a no-holds-barred battle with Kubica on the final lap.
Spyker gained their first-ever world championship point after stewards decided that Toro Rosso's Vitantonio Liuzzi had overtaken Adrian Sutil under a yellow flag on lap 55 of Sunday's race.
Liuzzi was handed a 25-second penalty, promoting Sutil to eighth overall and denying Toro Rosso their first point of the season.
Englishman Jenson Button's hopes of a strong race after qualifying in a season-best sixth place were dashed when his front wing was broken in a collision at the start of the race.
He rejoined, but was never in the running for points and retired on the last lap with broken suspension following a collision with Super Aguri's Takuma Sato.
Japanese Grand Prix result after 67 laps of Fuji Speedway:
1 Lewis Hamilton (GB) McLaren-Mercedes two hours 0 minutes 34.579seconds
2 Heikki Kovalainen (Fin) Renault 8.377 secs behind
3 Kimi Raikkonen (Fin) Ferrari +9.478secs
4 David Coulthard (GB) Red Bull-Renault +20.297
5 Giancarlo Fisichella (Ita) Renault +38.864
6 Felipe Massa (Brz) Ferrari +49.042
7 Robert Kubica (Pol) BMW Sauber +49.285
8 Adrian Sutil (Ger) Spyker-Ferrari +1:00.129
9 Vitantonio Liuzzi* (Ita) Toro Rosso-Ferrari +1:20.622
10 Rubens Barrichello (Brz) Honda +1:28.342
11 Jenson Button (GB) Honda one lap behind
12 Sakon Yamamoto (Jpn) Spyker-Ferrari one lap
13 Jarno Trulli (Ita) Toyota one Lap
14 Nick Heidfeld (Ger) BMW Sauber two laps
15 Takuma Sato (Jpn) Super Aguri-Honda two laps
R Ralf Schumacher (Ger) Toyota 55 laps completed
R Anthony Davidson (GB) Super Aguri-Honda 54 laps
R Nico Rosberg (Ger) Williams-Toyota 49 laps
R Sebastian Vettel (Ger) Toro Rosso-Ferrari 46 laps
R Mark Webber (Aus) Red Bull-Renault 45 laps
R Fernando Alonso (Spa) McLaren-Mercedes 41 laps
R Alexander Wurz (Aut) Williams 19 laps
* Liuzzi penalised 25 seconds for overtaking while yellow warning flags were being waved