The final phase of qualifying was halted, with only Piastri and Haas' Nico Hulkenberg having set times, when Sainz slammed backwards into the barriers at the final corner as he prepared to start his flying lap.
The win was a first for Ferrari in Mexico since 1990 and fourth of Carlos Sainz's career.
Red Bull's Max Verstappen dealt Lando Norris a shattering blow in their Formula One title battle by winning a wet and chaotic Sao Paulo Grand Prix from 17th on the grid.
It was the first time Verstappen, winner of a record 19 of 22 races last year, has won the first two races of a season. He has also won 19 of the last 20.
The pole was the 26th of Charles Leclerc's career, and third of the season.
Lando Norris put McLaren on pole position for the Spanish Grand Prix on Saturday
Lewis Hamilton shed pent-up tears of joy after ending a 945-day wait for a win with a record ninth British Grand Prix victory in front of his home fans on Sunday.
George Russell led Lewis Hamilton in a Mercedes front-row lockout in qualifying for the British Grand Prix on Saturday with McLaren's Lando Norris completing a rare one-two-three of home drivers.
Max Verstappen won Formula One's first Chinese Grand Prix in five years on Sunday.
World champion Max Verstappen took the first pole position of the Formula One season in Bahrain on Friday.
Max Verstappen took the 50th win of his Formula One career, and record-equalling 15th of the season
Red Bull are concerned about their constructors' title defence being weakened at a time when McLaren are emerging as a threat
Mexican team mate Sergio Perez qualified second fastest in a front row lockout for Red Bull, 15 years after the team took their first win at the Shanghai International Circuit with Sebastian Vettel.
Formula One leader Max Verstappen celebrated a record-equalling ninth successive victory on Sunday after beating the rain to win a chaotic and red-flagged Dutch Grand Prix for the third year in a row.
Red Bull's triple world champion Max Verstappen followed up a Saturday sprint win with a statement pole position for Sunday's Austrian Grand Prix, with McLaren's Lando Norris again alongside on the front row.
Double world champion Max Verstappen ran away with a Saturday sprint race in a Red Bull one-two at the Austrian Grand Prix.
Fernando Alonso will start the Miami Grand Prix on the front row alongside pole sitter Sergio Perez, providing Aston Martin the chance for a win, believes team principal Mike Krack.
Verstappen's hopes of a record-extending 11th successive victory looked a long shot on a city circuit where overtaking is never easy.
World champion Max Verstappen got back to winning ways on Sunday with a third straight pole-to-flag victory at the Japanese Formula One Grand Prix, leading teammate Sergio Perez across the line for a Red Bull 1-2 at Suzuka.
Leclerc took pole in Monaco in 2021, but did not start the race due to a driveshaft failure, and 2022 when he ended up fourth.
The Dutchman's run of nine successive wins was snapped as he broke down on lap four with a brake problem.
Max Verstappen won the first sprint race of the Formula One season at the Chinese Grand Prix on Saturday.
Max Verstappen won the season opener as Red Bull registered a dream start with a one-two finish at the Bahrain GP.
Max Verstappen clinched his second win of the season as the Australian Grand Prix was halted with three red flags.
Max Verstappen took pole position on Saturday in a wet qualifying for a Canadian Grand Prix
Hulkenberg is the team's reserve driver and has stood in for them three times already since he last raced full time in Formula One with Renault in 2019.
Sergio Perez beat teammate and championship leader Max Verstappen to win the Azerbaijan Grand Prix on Sunday and continue Red Bull's Formula One domination with a double success in Baku.
Max Verstappen won the Miami Grand Prix from ninth on the starting grid with a masterful display of tyre management on Sunday.
Lando Norris capitalised on a bit of good fortune to win the Miami Grand Prix on Sunday
Ferrari's Carlos Sainz won the Australian Grand Prix on Sunday in a triumphant return two weeks after appendicitis surgery as Red Bull's World champion Max Verstappen suffered his first retirement in two years.
Max Verstappen led a soggy Monaco Grand Prix from start to finish on Sunday
Sergio Perez won the Saudi Arabian Grand Prix from pole position in a Red Bull one-two on Sunday with Max Verstappen staying top of the championship after racing from 15th to second.
Red Bull's Max Verstappen sang "Viva Las Vegas" after racing to a record-extending 18th victory of the season and joining Sebastian Vettel in third place on Formula One's all-time winners' list.
Seven times world champion Lewis Hamilton was seventh for Mercedes and Lance Stroll collected the final point for Aston Martin.
Max Verstappen won Red Bull's home Austrian Grand Prix from pole position and with the fastest lap on Sunday for the team's 10th successive Formula One victory and ninth in nine races this season.
The 41-year-old double world champion, enjoying a renaissance with his much-improved team, finished third in Jeddah but was demoted to fourth by a 10-second post-race penalty.
Red Bull's Max Verstappen started the season with a commanding Bahrain Grand Prix win from pole position.
As impressive as those results have been, Red Bull team principal Christian Horner took the opportunity after the race to issue a scary warning that his team is capable of winning every grand prix this season.
Verstappen struggled for grip through qualifying but it all came together in his last effort
Max Verstappen won the Spanish Grand Prix from pole position to stretch his Formula One championship lead to 53 points.