Carlos Sainz's pole near-miss at Formula 1's Azerbaijan Grand Prix was no fluke, with its roots in recent efforts Williams has made to cure a key weakness.
Sainz looked on the verge of one of the shocks of the season when he emerged from the early chaos of Baku Q3 at the top of the timesheets.
With rivals having been unable to finish laps thanks to the red flags caused by Charles Leclerc and Oscar Piastri, only Sainz, Liam Lawson and Isack Hadjar had times on the board with a few minutes remaining.
Sainz's chances of holding on the top spot appeared to hang on track conditions, as on-off rain showers swept across the Baku circuit.
But although Max Verstappen duly went on to nail his lap to grab a second consecutive pole position Sainz's final efforts show that his first lap was not just a fluke.
The fact that Sainz responded with sector improvements that, bar one small mistake, could well have still beaten even the champion's Red Bull, showed that his Azerbaijan surprise was not just down to others getting it wrong.
How Williams nearly struck gold

The nature of the Baku circuit – with its long straights, short corners and straightline braking – are perfect stomping ground for the Williams car.
So the opportunity was always there for it to do better here than some other venues that expose its weaknesses.
However, that Sainz was able to nail his laps so perfectly was ultimately down to some key decisions that Williams made in terms of execution.
This revolved around both the choice of tyres – in that it was confident of when to run the medium and when to run the soft – but more critically where it wanted to be running in the train of cars out on track in qualifying.
As Sainz said: "Honestly, we nailed the qualifying today. Every time being on the right tyre at the right time and putting together some very strong laps."
Williams had committed to being towards the head of the train, with both Williams and Sainz feeling that was a critical call in helping it do what it did.
In the first run of Q3 where Sainz came out on top, he was the second car running on track – sandwiched between Lawson and Hadjar's Racing Bulls.
It meant that when the fourth car, which was George Russell's Mercedes, went off at Turn 4 – bringing out the double yellows briefly and scuppering the laps of those immediately behind him including Lando Norris – Sainz was well ahead of the trouble.
More critically it meant that by the time Leclerc had crashed at Turn 15 to bring out the red flags, Sainz and the two Racing Bulls had got their times in while nobody else could.
In the second run of Q3 for the restart, Sainz was second in line behind Verstappen but bailed from that lap prior to Piastri putting it in the wall at Turn 3.
Then for the final run, Sainz was third in the train – behind Norris and Russell. While ultimately this proved to be not ideal - as Verstappen who was seventh on the road enjoyed the better track conditions as the cars ahead helped dry out the track a little – that could only be known with hindsight.
As Williams team boss James Vowles told The Race, it was the team's execution that had got Sainz close enough in the first place to have a shot at pole.
"You don't plan on the perfect optimal run plan of X, you plan on getting your lap in when you can against others," he said.
"You're trying to always position the car in the correct place in the queue, where the track is in the right place and the tyres are in the right place."
Beyond the position in the queue, what also helped Sainz was that Williams appeared to finally be on top of tyre temperature management – so his rubber was bang in the window it needed to be.
Williams has found out to its cost many times this year that getting stuck in the queue leaving the pits was cooling its tyres too much. And, for a car that has such a narrow operating window on this front, this was causing some qualifying disappointment.

Well aware of the problem, Williams had conducted a bunch of experiments with Alex Albon in Friday practice at Monza, and had run further test programmes in Baku throughout Friday.
These efforts included both work on getting the tyres into the right operating window, and some disaster planning for getting things back to the right temperature if temperatures had gone wrong through preparation or outside influence.
So on a qualifying day when an unexpected temperature drop and drizzle pushed the soft and medium compounds into uncertain territory where warm-up was a problem, Williams was actually ahead of the curve in knowing what needed to be done.
Vowles added: "We spent the last 10 days properly going through why have we not been competitive in qualifying so far this year.
"We can all acknowledge that the car was quick in the race but come qualifying, we're out of position and I'm really proud of the work done by the team.
"It was a menu of items, about 10 items that we were ticking off through FP1, FP2, FP3. I think everyone can acknowledge now that whatever compound it was, whatever lap it was, we did the lap."
Could Sainz still have done it?

Being able to nail each lap with what Vowles has labelled as a new "direction" in preparing tyres helped unleash great speed from Sainz in that first Q3 run as he took the top spot.
But what almost went under the radar as Verstappen beat him at the end was just how close Sainz had been to going even better.
Comparing the sector times of both him and Verstappen, we can see that Sainz all-but matched Verstappen's 35.331s in the first sector, and was two tenths of a second faster than him in the final sector.
But he bled time in the middle sector thanks to a sideways moment as he came out of the Turn 5/6 S-bend, having been caught out by how slippery it was.
According to GPS data, from being around 0.5s up on his first Q3 run on the way into the corner, the loss of momentum on the run down to the tight Turn 7 right-hander meant he was about 0.25s adrift by then – which he then never really recovered.
A deeper dive into his theoretical best shows that had he repeated his sector two time from the first run, then pole was up for grabs.
Verstappen's final Q3 run
Sector 1 35.331s
Sector 2 40.577s
Sector 3 25.219s
Total: 1m41.117s
Sainz's two Q3 runs
Run 1 Run 2
Sector 1 35.838s 35.337s
Sector 2 40.574s 41.510s
Sector 3 25.183s 25.017s
Total 1m41.595s 1m41.864s
Theoretical best: 1m40.928s
While the data shows that a Sainz pole at the end would have been earned on merit, Vowles actually suggested he wasn't too sad to miss out on a result that might have been seen as lucky.
Asked by The Race if he was disappointed not to have seen Sainz stay on top, he said: "No. Not for me, I'm really purist. I want us to earn our pole position where no one out there can write a story of luck, where we've earned it."
Key tyre knowledge
While Williams has a great chance to convert its front row start into a podium finish in the Azerbaijan Grand Prix, the likelihood is of an equally chaotic afternoon that could well be dictated by safety car (both real and virtual) interruptions.
Plus, Vowles well knows that there are some quick cars that are out of position on the grid that may well come forward.
"We had a really good long run pace on Friday so I'm confident that the car is still good, but there's a but," he said.
"Both McLarens are outstandingly quick, and Verstappen is outstandingly quick, so you can count on them being in front.
"Ferrari was handy on Friday too, so you take that all into the melting pot."
But Williams may well have another tyre knowledge ace up its sleeve heading into the race.
With the race a potential one-stopper, managing the transition from the medium to the hard tyre will be key.
And Williams is the only team that has so far run that latter compound – after Albon tried it out on Friday. Vowles believes that data bank of knowledge could be critical.

"There's a little bit of risk to it, but understanding what that tyre can do for the team is quite an important asset," he said.
"Understanding whether the medium grains is critical to whether the hard is outstandingly good or just good.
"The medium didn't grain, which actually means the medium is a usable tyre as well at the same time. But it [running that hard] provides learning that no one else on the grid has today."