MEXICO CITY - Nico Rosberg stood highest on the post-race podium, wearing a big black sombrero as the champagne sprayed amid chants of "Ole! Ole!" from the massive crowd.

There was no way he was tossing this hat at anybody. This one was a keeper.

Rosberg won the first Mexican Grand Prix since 1992 on Sunday for his fourth victory this season, denying Mercedes teammate Lewis Hamilton in his bid to tie the Formula One record of 13 victories in a season.

And it earned him a sliver of satisfaction in defeating Hamilton, who has beaten him to the season championship the past two years.

"Muchas gracias!" the German shouted. "This is the best podium of the year."

Hamilton, the runner-up, has 10 victories this season with two races left. Rosberg is second in the driver standings ahead of Ferrari's Sebastian Vettel, who crashed on Lap 52 and didn't finish.

Rosberg started from the pole and avoided the mistakes that doomed him a week earlier in the United States, a loss to Hamilton that led to a moment of petulance when Rosberg threw a sponsor's cap at his teammate. This time, there was only a polite handshake.

Sitting next to each other in the post-race news conference, Hamilton said Rosberg simply got the better of him, then poked him with a gentle reminder who the season champion is.

"Nico drove very well today. Made no mistakes," Hamilton said. "It was quite fun to be able to push and not worry about points. It was just racing."

Formula One's first race in Mexico in 23 years drew a huge crowd, with most of the fans cheering Force India's Mexican driver Sergio Perez, who finished eighth.

The Autodromo Hermanos Rodriguez was considered one of the rowdiest and dangerous circuits to drive when it last hosted Formula One, but was given a $50 million upgrade to resurface the track and modify the course. That softened its fearsome Peraltada turn, the site of spectacular, and occasionally deadly, crashes in previous years.

The track also has the longest straight in Formula One, which put the power in Mercedes' dominant engines up front. That's where Hamilton had hoped to catch Rosberg at the start.

Rosberg got the good start he needed through the long straight and beat Hamilton to the first turn. Hamilton's late attempt to pass didn't work, unlike his aggressive move in the U.S. Grand Prix last week that forced Rosberg wide.

"That was important," Rosberg said. "Maybe the most important part of the race."

Rosberg had to manage his tires through two pit stops and hold off Hamilton late when Vettel's crash brought out the safety car and all but erased Rosberg's 3-second lead. When the racing restarted, Rosberg quickly pushed his lead over Hamilton back up to 1.5 seconds to chase the checkered flag.

Williams' Valtteri Bottas finished third but had another run-in with Ferrari's Kimi Raikkonen. A clumsy bump by the Ferrari driver broke Raikkonen's right rear axle. Those two had a similar incident three races ago in Russia.

"I had no space to go," Bottas said. "I'm not going to back off. I'm going to fight for position."

Ferrari had a bad day all around.

Vettel, who has three victories this season with Ferrari's improved engine, started third but quickly dropped to the back when a touch with Red Bull's Daniel Ricciardo in the first lap left him with a punctured tire.

Vettel recovered and was moving forward, picking cars off one by one, before his aggressive drive cost him when he spun and crashed late in the race.

It was the first time Ferrari had both cars not finish a race since 2006. Vettel's mistake leaves him 21 points behind Rosberg in the fight for second.

"Ok, I crashed," Vettel radioed to his crew. "I did a (bad) job today."

Red Bull's Daniil Kvyat finished fourth, tying his best mark of the season.

McLaren's season-long struggles with its new Honda engine continued when Fernando Alonso lost power on the first lap and had to immediately retire.

"I enjoyed the race ... for the first three corners," Alonso said.