Alonso takes first place for Ferrari, Sauber's Perez grabs second and Lewis Hamilton maintains McLaren's lead with a third-place finish.
Sunday's Malaysian Grand Prix saw an action-packed race unfold after a brief stoppage caused by heavy rain.
The weather had held for all three practice sessions conducted, Hamilton dominating two of them.
Practice and Qualifying
Kimi Raikkonen was forced to change his gearbox and incur a five place grid penalty, also complaining of a recurrence of the steering problem from Australia.
Injury was then added to insult, the Lotus team's hospitality unit at the Sepang circuit set ablaze by an electrical fault.
Dry qualifying was no help for Felipe Massa, who continued to struggle, failing to make it out of Q2.
The third part of qualifying was a thrilling battle between the two McLarens, Schumacher's Mercedes and Raikkonen's Lotus for the top five places.
Mark Webber set an almost identical time to Raikkonen, two-tenths ahead of teammate Vettel.
"The car balance and performance was better than in Melbourne and we have a good race car," Webber said after the session.
"We know everyone will be struggling with tyres so we just have to be a little bit better."
Young Australian Daniel Ricciardo also seemed to lose his pace between races, landing fifteenth. Michael Schumacher grabbed third with the two McLarens starting as they did in Australia with Hamilton on pole.
The field started the race on intermediates as rain had fallen minutes before the start.
Grosjean steamed ahead of Webber and Vettel off the line, but quickly went backwards again after cleaning up third place Michael Schumacher. The Lotus driver soon spun again and that was the end of his race.
Bruno Senna managed to run into his teammate Pastor Maldonado and pitted for a new wing, Senna's second misdemeanour in as many races.
Kimi Raikkonen faded as Kobayashi picked up eight places on the start.
Webber held third place by the end of lap 1, Schumacher languished at the rear of the field.
The two McLarens took off into the lead and as the laps went by, the rain grew heavier and more and more cars dived into the pits for full wets.
Red Bull and McLaren were among the last to pit their cars, Red Bull queueing their cars in pit lane.
Soon after, with drivers all up and down the field reporting aquaplaning, the Safety Car was deployed and then, a few laps later, a red flag thrown on lap 9.
Webber had fallen to fourth after Perez got lucky with his pit stop timing and on the restart, Button immediately took to the pits. Webber was overwhelmed by Alonso and then Vettel.
Webber grabbed the place back from Vettel and set about chasing down the Ferrari but pitted for intermediates. Red Bull's stop was slow and Hamilton had a horror stop after missing his marks, slipping behind Button.
Button then threw away his advantage, driving into the HRT of Narain Karthikeyan, pitting for a replacement front wing. "Totally my fault," he said after the race.
Red Bull did a much better job with Vettel, vaulting him over Webber and in front of Raikkonen for good measure.
After the race settled, Alonso led with Perez, Hamilton, Rosberg, Vettel and Raikkonen behind.
As expected, the tyres on both Mercedes started shredding themselves and Rosberg lost three places in four laps, Webber going around the hard way rather than relying on DRS.
Ricciardo, who was having a stellar race overtaking around the outside at every opportunity, was the first to pit for slicks, switching to the medium tyre.
Button and Webber came in for slicks as soon as Ricciardo's times improved.
It worked, Webber ending up in front of Raikkonen. He smashed the fastest lap time, lopping 11 seconds from his intermediate lap times.
Alonso pitted before Perez for slicks as the other leading teams poured into the pits.
Perez's chance for victory seemed sunk, but the Mexican shrugged off the disadvantage, drawing up behind Alonso in short order.
On lap 48, Vettel cut across Narain Karthikeyan's front wing, causing his right rear tyre to disintegrate. Vettel was far less kind than Button.
"Some people need to look where they are going," Vettel said later.
Perez continued to threaten Alonso until sliding wide on lap 51 at turn 12, losing five seconds by putting two wheels on the white line, never a good thing on a damp track.
In contrast to his teammate, Hamilton's race remained anonymous in third, despite a closing, rampant Webber.
Pastor Maldonado's heart broke just after his Renault engine dropped a cylinder bank, again falling out of the race almost at the death, losing a points-paying position.
Alonso crossed the line in a car and for a team that had been written off by the vitriolic Italian media. It may have been a different story had Perez not run off the road, but Alonso's level head and towering experience won him the race.
"This changes nothing," warned Alonso after the race. "We are still in a position we don't want."
Hamilton led Webber home for third while Raikkonen again scored points and Senna, making up for his earlier disaster, grabbed sixth for the resurgent Williams-Renault.
Formula 1 returns in two weeks at the Shanghai track for the Chinese Grand Prix.
- Fernando Alonso - Ferrari - 2:44:51.812
- Sergio Perez - Sauber - +2.263
- Lewis Hamilton - McLaren - +14.591
- Mark Webber - Red Bull - +17.688
- Kimi Räikkönen - Lotus - +29.456
- Bruno Senna - Williams - +37.667
- Paul di Resta - Force India - +44.412
- Jean-Eric Vergne - Toro Rosso - +46.985
- Nico Hülkenberg - Force India - +47.892
- Michael Schumacher - Mercedes - +49.996
- Sebastian Vettel - Red Bull - +1:15.527
- Daniel Ricciardo - Toro Rosso - +1:16.828
- Nico Rosberg - Mercedes - +1:18.593
- Jenson Button - McLaren - +1:19.719
- Felipe Massa - Ferrari - +1:37.319
- Vitaly Petrov - Caterham - +1 Lap
- Timo Glock - Marussia - +1 Lap
- Heikki Kovalainen - Caterham - +1 Lap
- Pastor Maldonado - Williams - +2 Laps
- Charles Pic - Marussia - +2 Laps
- Pedro de la Rosa - HRT - +2 Laps
- Narain Karthikeyan - HRT - +2 Laps
- Kamui Kobayashi Sauber +10 Laps (DNF)
- Romain Grosjean Lotus +53 Laps (DNF)
- Interested in buying FERRARI ? Visit our FERRARI showroom for more information.