MONTREAL -- AlphaTauri driver Pierre Gasly claimed an unlikely victory at the Italian Grand Prix after a chaotic race which saw world champion Lewis Hamilton receive a 10-second stop-go penalty and both Ferraris fail to finish at their home circuit on Sunday.

It was Gasly's first-ever win in Formula One. The 24-year-old Frenchman finished 0.415 seconds ahead of McLaren driver Carlos Sainz and 3.358 ahead of Racing Point's Lance Stroll of Montreal on an entirely unexpected podium. All three drivers had never won a race and each had only one top-three finish to their name.

"This is a loss for Mercedes and the big teams, but it's a victory for the sport. That was great entertainment today and it was fantastic to see the young guys fighting out front," Mercedes team principal Toto Wolff said.

Hamilton appeared on course for a comfortable victory from pole position but he was given the penalty for entering the pit lane after it closed to allow crews to clear Kevin Magnussen's stricken car that had come to a stop nearby

Hamilton, however, kept his championship lead of 47 points, with Mercedes teammate Valtteri Bottas moving into second despite only finishing fifth after Red Bull's Max Verstappen had to retire with a mechanical problem. Verstappen is now 54 points behind Hamilton, who remains favourite to win a seventh title to tie Michael Schumacher's record.

Hamilton finished seventh, 17.245 behind Gasly, who was emotional as he crossed the line to become the first French winner at any GP since Olivier Panis in 1996.

Toronto's Nicholas Latifi was 11th.

"It was such a crazy race. The car was fast, and to go through so much in the space of 18 months. First podium last year (in Brazil), now first victory in Monza. I have no words," said Gasly, who was dropped by Red Bull last year.

Gasly celebrated wildly with his team but then, after the trophy presentation, was seen sitting down on the top spot of the podium alone. He had a moment to reflect on his achievement, as he took a swig of champagne surrounded by ticker-tape.

"I would have never expected that a year ago," said Gasly, who had started 10th on the grid. "The podium was already unexpected, a big big highlight last year.

"I sat down and I had a lot of things crossing my mind, obviously first of all my family, my friends, and all the people who supported me. You just remember everything you've been through ... It was a very special moment. It's been a crazy ride in the last few months. It's just unbelievable, I'm still struggling to realize what we've just achieved."

Sainz hustled Gasly all the way to the checkered flag as both strove for their first win.

"It's incredible that I am halfway disappointed with P2," Sainz said. "I wouldn't have believed that I would have got a chance to fight for victory today. I think it's what we deserved.

"We need to be proud of that, we need to be proud of the pace of the car."

Ferrari's abysmal weekend continued as Sebastian Vettel had a brake failure on Lap 6 and he limped into the pits with his right-rear brake disc in flames. It was the four-time champion's first DNF at Monza in his 14th start.

Vettel's teammate Charles Leclerc had made it into fourth but lost the rear of the car under acceleration through Parabolica on Lap 25 and crashed into the barriers, causing the race to be red flagged.

By that time Hamilton's penalty had been announced. Hamilton had an 11-second advantage when he pitted immediately after the safety car had been deployed after Magnussen broke down but was unaware the pit lane was closed as the marshals recovered Magnussen's Haas.

Antonio Giovinazzi received the same sanction.

Hamilton served his penalty shortly after a 27-minute delay while the barriers were repaired. The British driver emerged last on Lap 29, more than 30 seconds behind Gasly, but passed eight cars and secured a bonus point for the fastest lap following his punishment.

"My race wasn't meant to be today but what doesn't kill you only makes you stronger," Hamilton said. "It was a long pit stop but once I finally caught everybody I enjoyed that bit of a battle.

"We didn't do a great job with the pit stop. I didn't see those boards and take responsibility for that and it's something I'll learn from. To get seventh and still get the fastest lap is still some good points so I'll definitely take it."

Ferrari will be hoping to do a lot better at next weekend's race, which is also in Italy, at Mugello. The 5.245-kilometre (3.259-mile) circuit has never previously hosted an F1 race.