By Andrew Benson
It might not have looked like it after Lewis Hamilton locked up and disappeared up the escape road and out of a brief lead just before the end of the race, but ultimately he and Mercedes got away with a poor weekend at the Azerbaijan Grand Prix.
In fact, although that late, uncharacteristic error cost Hamilton a victory, he had already had his big break.
Red Bull's Max Verstappen was on course to win the race at a canter, and would have extended his championship lead to 15 points had he not crashed as a result of a high-speed tyre failure with five laps to go.
That terrible luck then gifted Hamilton a golden opportunity to turn the tables on Verstappen, which he failed to take.
And while Mercedes left Baku with plenty to ponder - team boss Toto Wolff described their performances there and at the previous race in Monaco as "just not acceptable" - the same can be said about F1.
Verstappen's was the second of two frightening incidents caused by tyre failures. And while supplier Pirelli said its initial investigations indicated they were caused by debris on the track, there will be concern among the teams and drivers, even if they were reluctant to say so publicly on Sunday evening.
How Hamilton messed up
When the race was stopped following Verstappen's accident, Hamilton suddenly had the chance to reclaim the championship lead he lost at Monaco, where the Mercedes driver could finish only seventh while his title rival won.
Hamilton had been unable to match the Red Bulls for pace through the race, but now he was starting on the front row alongside Verstappen's team-mate Sergio Perez for a two-lap sprint to the flag.
At first, Hamilton did everything right. He got the jump on Perez when the lights went out and was alongside into the first corner, looking briefly like he had just won himself the race. But then he locked up his front tyres in a cloud of smoke and dropped to 15th place.
Hamilton described the error as "humbling" - and Wolff said he and Hamilton were "destroyed" about it afterwards - but it was not quite as straightforward as a simple mistake.
Hamilton had inadvertently knocked a switch in the cockpit which had caused the incident.
Mercedes call it "magic", a typical example of the sort of jargon and code F1 teams use to hide what they are doing from rivals and the public.
It's a fancy name for a straightforward technology. 'Magic' switches the brake bias hugely to the front, so drivers can use the heat from the brakes to warm up the front tyres prior to the start of a race or a qualifying lap.
Hamilton had turned it off, as he should, before the start. But in jinking to avoid Perez as the Mexican tried to defend off the line, he had caught the switch again.
"Checo pulled to the left and I moved to the left and I hit a switch unknowingly and it basically just switched off the rear brakes and only the fronts were working," Hamilton said.
"It's really painful but I am really sorry to the team for this day. All I can do is try to rebuild."
Had that not happened, Hamilton would have won the race and turned his four-point deficit in the championship into a 21-point lead.
Deep down, though, the message of the weekend was not lost on him: "Second to last lap to lose out [is tough], but Max had bad luck also today. There is a long way to go."
Wolff said: "I have a four-hour flight with Lewis now and I just need to let him know that this wasn't because of a mistake by him. He doesn't make mistakes and I wouldn't have anybody else in that car."
Mercedes' bigger concerns
The concern for Mercedes leaving Baku was less that they had failed to capitalise on their main rival retiring, and more that they have been a long way from their usual performance over the past two races.
Both in Monaco and in Baku the team have struggled for competitiveness, and both races have followed similar patterns.
In each, they were off the pace for much of practice. In each, one of the cars qualified well while the other struggled. And in both cases the leading driver would have been on the podium were it not for some bad luck - in Monaco, Valtteri Bottas with a stuck wheel nut; and Hamilton with his cockpit fumble in Baku.
On Saturday evening in Azerbaijan, the two big stories were Charles Leclerc somehow putting the Ferrari on pole, and how Hamilton had apparently rescued a weekend that appeared to be spiralling out of control by joining him on the front row.
But within Mercedes they were not really sure how Hamilton had suddenly found pace in qualifying, and he certainly didn't have it in the race.
He passed Leclerc after just one lap - although he was helped by the fact that Leclerc had cut the track to avoid a branch, and then slowed fearing a penalty, allowing Hamilton to get closer through the final two corners that he would otherwise have done.
The first alarm bells over Mercedes' pace rang when, once in front of the Ferrari, Hamilton was unable to pull away.
Once Verstappen, too, had passed the Ferrari, he was clearly quicker than Hamilton. And when Hamilton made his pit stop, the pace of Verstappen and Perez increased by 0.6 seconds a lap. Both leapfrogged the world champion at their pit stops.
Although this was going to happen anyway, this part of the race also exposed another Mercedes weakness. Hamilton was held at his pit stop to allow Pierre Gasly's Alpha Tauri past. But it was questionable whether they needed to do that - they appeared to have the gap they needed to release Hamilton anyway.
Wolff said: "What I take away is we must bring our A game to fight for this championship, and our car was not there all weekend. Operationally we just need to perform faultlessly and all of us haven't done that the last two weekends."
He added that he was "so angry - but I've got to transfer that energy into something productive so we can improve next time out at Paul Ricard.
"We just need to be the best of us, the best that we have, and we haven't given the drivers a competitive package this weekend - far from it. It is not only the incident at the end that frustrates, it is overall not meeting our expectations, all of us together - Lewis, the engineers, myself, everyone in the team.
"There's just so much we need to improve that I just want to get on it right now to make sure we are able to compete for this championship. Because we can't continue losing points like we did in Monaco and here. It's just not acceptable, for all of us."
The positives from Mercedes' point of view are that Monaco and Baku, while different layouts, share certain characteristics - they are street circuits, with low-grip surfaces and few fast corners to generate energy in the tyres.
That being the case, they expect to be back to competitiveness in France, and the succeeding races in Austria, Britain, Hungary and so on.
Verstappen's missed opportunity
While Mercedes were down in the dumps, it was Verstappen who had most reason for regret. But, showing the maturity and calmness that has characterised him this season, he was remarkably phlegmatic about it.
"It's frustrating and very disappointing to retire with a tyre blowout so close to the finish," he said. "It's a big shame - sometimes you can hate this sport. For a few hours - and then I will be fine again.
"Until then, it was a great day. The car was on fire, I was quite comfortably in the lead and it would have been an easy win. But there are no guarantees in this sport.
"We know when we get to normal tracks, Mercedes are normally very strong. So it is a bit of a shame to not open the gap a bit more. But of course in the end we got a bit lucky with Lewis going straight in Turn One so we are still leading the championship. But of course it is not the way I want it to be. I wanted to really open up the gap."
The incidents that befell Verstappen and Hamilton opened the door for Perez, who had driven strongly all weekend, close to his team-mate's pace, on his best performance since joining Red Bull for this season.
Finally, Perez performed exactly the role for which Red Bull signed him - close enough to Verstappen to become a thorn in Mercedes' side. He was quicker than Hamilton, passed him at the pit stops with a burst of pace, and was in a solid second until the late chaos.
If he carries on like that, a new contract with Red Bull for next season is surely only a matter of time.
The tyre question
The tyre failures suffered by Verstappen and Stroll set alarm bells ringing throughout the sport.
Pirelli has introduced new tyres this year, with a stronger construction, to try to guard against the sort of failures that were seen at last year's British Grand Prix, when a last-lap delamination almost cost Hamilton the win, and the same failure did cost Bottas and Carlos Sainz - then at McLaren - strong points finishes.
Last year was not F1's only experience of Pirelli tyre failures. They dot the company's history in the sport since they became the sole tyre supplier in 2011. These intermittent failures have been a consistent concern for teams and drivers, as have the tyres' performance characteristics, which prevent drivers from pushing flat out in races because they have to manage the rubber's thermal sensitivity.
The failures in Baku were remarkably similar. Both were on the hard tyre, both on the left rear, both within a few hundred metres of each other on the pit straight at maximum speed, shortly after a right-hand kink that would have loaded up the left-hand tyres, and both within three laps of each other in their lifecycle.
Red Bull sporting director Jonathan Wheatley expressed his concern to race director Michael Masi immediately after Verstappen's crash.
"We got no warning of that failure," Wheatley said. "Nothing. Consider a red flag to give everyone the opportunity to change tyres."
Masi said afterwards that was already on his mind, and he duly took that decision.
Pirelli motorsport boss Mario Isola said that the company would do a full analysis of the failed tyres with the intent of reporting before the next race, but that what he called the "preliminary investigation" at the track had indicated that they were both caused by cuts from on-track debris.
Verstappen, as it happened, had already pre-empted that conclusion in his post-race interviews.
"For sure [there will be talks with Pirelli] but we know the result from that conversation already and that's a bit hard to accept," he said.
"It will be related to debris; it's like that. I'm sure there will be talks; Pirelli isn't happy with what happened here today.
"We're doing the same line every lap because everyone wants to be in the slipstream. It's very weird that it happens to me.
"I think they cleaned the track [after the Stroll crash] but Pirelli is probably going to say it was carbon debris on track.
"It was like that in Imola [last year, when Verstappen also had a tyre failure]. So that's something you can't say anything about. The fact is another tyre exploded, not only for me but also for Stroll. It's very frustrating."