Carlos Sainz won the Singapore Grand Prix for Ferrari on Sunday to end Formula One leader Max Verstappen's record run of 10 wins in a row and shatter Red Bull's dream of going through the season unbeaten.
McLaren's Lando Norris and Mercedes' Lewis Hamilton completed the top three, with Sainz only 0.812 clear at the chequered flag, as Red Bull were swept off the podium for the first time since last November's Brazilian Grand Prix.
In a strategic, slow-burning thriller the Spaniard lived up to his 'smooth operator' nickname.
Starting on pole, Sainz kept the field close enough to remove any pitstop window for others, managing his tyres before helping former team mate Norris stave off the chasing Mercedes by letting him stay in DRS range.
Mercedes' George Russell, pushing hard for the win on far fresher medium tyres than the leaders, crashed on the last lap while in third place with Hamilton inheriting the podium position and also taking fastest lap.
"We nailed the race," said Sainz after his second career win for the Italian team and first since Silverstone last year.
"We did everything we had to do. We did it perfect and we brought home a P1 that I'm sure all Italy and Ferrari is going to be proud and happy today.
"A safety car forced us to pit even earlier than we wanted and I knew it was going to be a long stint and hard ... it was just quite tight at the end but we gave Lando a bit of DRS (drag reduction) to help him and in the end we made it P1."
The Spaniard eked out his hard tyres for 42 laps, winning at the slowest possible speed, for Ferrari's first victory since Charles Leclerc triumphed in Austria in July last year.
Red Bull had won 15 successive races until Sunday but that looked set to end from the moment they failed to qualify in the top 10 at a circuit where, like Monaco, overtaking is always a challenge.
Double world champion Verstappen started 11th under the floodlights and finished fifth, with Mexican team mate and closest rival Sergio Perez, last year's winner in Singapore, eighth.
No team has ever won every race in a season of more than 10 rounds but Red Bull had looked capable of doing so until Singapore struck.
Verstappen stretched his overall lead to 151 points but the gap is not big enough for him to secure the title in Japan next weekend.
Hamilton moved up to third overall in the standings for the first time this season, ahead of Aston Martin's Fernando Alonso who failed to score in 15th.
Leclerc finished fourth with Pierre Gasly sixth for Alpine and Australian Oscar Piastri seventh for McLaren.
New Zealand's Liam Lawson, standing-in for the injured Daniel Ricciardo at AlphaTauri, took his first points in Formula One with ninth place and Kevin Magnussen secured the final one for Haas in 10th.
Mercedes trimmed Red Bull's lead in the constructors' standings to 308 points, keeping them waiting at least another weekend for the title.
The safety car came out on lap 20 when Logan Sargeant's Williams hit the wall and left debris on the track, with the Ferraris pitting but Red Bull staying out.
Verstappen, who started on the hard tyres, moved up to second with Perez fourth but they were soon overhauled and plunged down the field after stopping under normal conditions.
The virtual safety car was deployed on lap 44 when Alpine's Esteban Ocon stopped with a suspected gearbox failure, with the Mercedes pair pitting as the top three stayed out.
That set up a thrilling final chase with Russell and Hamilton reeling in those ahead but ultimately running out of time and track.
"I think we were half a car's length from winning the race had I got past Lando when I had the opportunity. I think we would have been able to get past Carlos," said Russell, the previous non-Red Bull winner.
"Then just the last lap, a millimetre lapse of concentration and game over."