Lando Norris drove an extraordinary race to catch and pass title rival Max Verstappen as his McLaren team-mate Oscar Piastri won an engrossing Azerbaijan Grand Prix.
The race ended under a virtual safety car after a crash between Red Bull’s Sergio Perez and Ferrari’s Carlos Sainz, who collided while disputing third place with two laps to go.
Piastri pulled off an audacious pass on Charles Leclerc, who had led from pole position, to take the lead shortly after both had made their only pit stop for fresh tyres and held on for the rest of the race under immense pressure from the Ferrari.
And Norris fought back after his late pit stop, having started on the hard tyre while the leaders chose mediums, to pass Verstappen with three laps to go.
He took fourth place, promoted from sixth by the Perez-Sainz crash, one ahead of Verstappen.
The result means Norris, who also scored the point for fastest lap, reduced Verstappen’s championship lead by three points on a day he would have started expecting to lose ground.
Norris is 59 points behind Verstappen with seven races to go and a maximum of 206 still available.
And McLaren have taken the lead in the constructors’ championship from Red Bull, taking a 20-point lead.
Leclerc converted his pole position into a lead at the first corner and appeared to take control of the race during the first stint, pulling out a six-second lead before Piastri made his pit stop on lap 15.
Leclerc followed him in a lap later and in theory should have easily had sufficient cushion to hold the lead to the end.
Leclerc said he felt he and Ferrari had not made the right set-up choices for the hard tyre because he had done no race-simulation running as a result of problems in Friday practice, and he struggled after his pit stop as a result.
Piastri closed in on the Ferrari, taking his chance on fresh tyres and, on lap 20, made a brave, late dive for the inside of Turn One to take the lead.
“They had a lower downforce package and we had a bit more downforce but in the straights they were flying and that is probably where we lost the race," Leclerc said.
"When he overtook me, I was not too worried. I thought I would stick with him and overtake him again once the tyres were up to temperature. But that opportunity never arose again. They were too quick on the straights. It was a small misjudgement but it hurts."
It was a superb move and seemed to catch Leclerc somewhat off guard. He told Piastri in the green room before the podium that he had braked at his normal spot and expected the McLaren to sail on past the apex.
Although Piastri was now in the lead, Leclerc was not done there, and he stuck hard to the McLaren, with Perez close behind, trying to find an opening.
For many laps the three circulated together, with Ferrari urging Leclerc on over the radio.
A few times Leclerc was close enough to try a move into Turn One, but Piastri always covered the inside line and had just enough to hold the Ferrari at bay with aggressive but clean defence.
Into the closing laps, Leclerc began to struggle with his rear tyres and he dropped back from Piastri, the race now won for the Australian.
Leclerc now had to fend off Perez and Sainz, who had a lonely race for much of the duration but closed on the top three during the final stages as Piastri measured his pace to hold off Leclerc.
The dramatic climax was triggered when Perez went for a move on Leclerc at the start of lap 50, with two to go.
Leclerc held him off into Turn One and Sainz was able sneak by the Red Bull before Turn Two.
Perez got a better run through the corner and began to edge alongside the Ferrari on the following straight.
The Red Bull had its front wheel inside Sainz’s rear and the two touched, spinning violently into the wall and taking both out of the race.
The incident promoted George Russell’s Mercedes into third place - the Briton had a quiet first stint but began to make ground in the second stint and was able to pass Verstappen and Norris into what was fifth place before the Sainz-Perez crash.
Norris started the race with low expectations and McLaren’s strategy to start on the hard tyre was partly in the hopes they may be able to catch a safety car by running long.
Norris was able to help Piastri by holding up Perez briefly after the Mexican had made his pit stop and just before Piastri was about to make his, ensuring the Australian was able to return to the track ahead of Perez.
He effectively made up places in the opening stint and ended up running behind Alex Albon’s Williams.
That meant that he was protected against Verstappen, who closed up on him after his pit stop because Norris could use the DRS from Albon to hold off Verstappen.
And soon Verstappen began to complain about his car over the radio.
Norris eventually stopped on lap 37 and rejoined just one place and 15 seconds behind Verstappen with 13 laps to go.
He began to close on the Red Bull at well over a second a lap and was on Verstappen’s tail and past with four laps to go.
Fernando Alonso took sixth for Aston Martin, having run at the head of the midfield much of the race, ahead of Albon and the second Williams of Franco Colapinto, who scored points on only his second start.
Lewis Hamilton, who had a quiet race from the back of the grid after an engine penalty, took ninth for Mercedes, while the final point was scored by Briton Oliver Bearman, impressive on his debut for Haas.
Bearman, 19, who will race for Haas next season, was standing in for Kevin Magnussen, who was banned for a race for exceeding the number of penalty points.