The Brackley-based outfit had been left with a strategy headache after Red Bull's decision to pit Max Verstappen for a second stop during the Shanghai race triggered a domino effect for the cars ahead to prevent being undercut.

With Sebastian Vettel responding to Verstappen's move, Mercedes knew that it too needed to cover Vettel with both its drivers who were running 1-2 on the track.

However, with Hamilton and Bottas running close together, if Mercedes had pitted Bottas first to head off the Vettel threat, then there was a risk that he could overtake Hamilton for the lead – which would have been unfair on the race leader.

Following a bit of quick thinking, Wolff himself came up with the suggestion of stacking the drivers in the pits, something that is rarely done during full race conditions.

After Wolff proposed the idea, team strategist James Vowles confirmed the plan would be tough but possible, before sporting director Ron Meadows gave it the green light.

Speaking on Mercedes' regular post-race YouTube debrief, the team's trackside engineering director Andrew Shovlin said: "It was actually Toto who suggested that we do a stacked stop.

"That then becomes a discussion between James Vowles and Ron Meadows. Ron is the sporting director and he is just checking that he is comfortable with the gap between the cars, that we can get the pit crew ready to do the stacked stop and have both sets of tyres in the pitlane.

"James is the one who gets the final decision on this and he decides to go ahead with it."

Shovlin admitted that there were risks associated with the stop, especially because stacked stops are not something that can easily be practiced for.

"You don't have two cars to practice with," he explained. "We do have a pitstop car and we can practice getting both sets of tyres out, we can practice doing two stops in succession but you can never quite get the same situation with the car rolling into the box.

"It is quite difficult for the rear jack man as he has to get out of the way when the first car leaves and then get into position when the second one comes in.

"The choreography is quite tricky, there is a bit more to organise. Having that many tyres in the pitlane is a bit of a risk, so you have to make sure the right tyres go on the right car. But it is something we do as much preparation for as we can."

He added: "You try not to do them unless you have to because if you have any problem with the first car, it also impacts the second – and you can go from being first and second in the race to third and fourth in no time. It isn't something you do every day, but on the occasions it makes sense it is a really tool to have in your tool set."

Such was the swiftness with Mercedes' procedures that Bottas' pitstop was actually quicker than Hamilton's – and he lost less than half a second in total pitlane compared to his teammate despite having to briefly wait.

Here, Motorsport.com reveal more details about how the stacked pitstop came about and the exact timings.

Valtteri Bottas, Mercedes AMG W10, makes a pit stop Photo by: Mark Sutton / Sutton Images

How Mercedes' double-stack stop played put

Lap 34

Max Verstappen pits for the second time, forcing the cars ahead of him to consider whether to stick to a one-stop strategy or move to a two-stop as well. At this stage, Mercedes it not sure if its tyres will last until the end if it stays on a one-stop.

Lap 35

As Hamilton exits Turn 14, the team begins the discussion the idea of a second stop to shadow the cars behind. But it faces a dilemma because second place Valtteri Bottas would need to stop first to protect his position to Sebastian Vettel if the German stops too. Doing that would then give the Finn the unfair advantage of the undercut on race leader Lewis Hamilton.

If the team pitted Hamilton first, though, then that would expose Bottas to the possibility of getting undercut by Vettel. Second latter, Toto Wolff from the garage suggests the unusual step of double stacking the cars. On the pitwall, head of strategy James Vowles says the tactic was tough but possible, while sporting director Ron Meadows confirms it is okay to do.

As the Mercedes drivers cross the start-finish line, Vettel pits: therefore prompting Mercedes in to action.

Lap 36

Just 22 seconds after the first discussion of a double stack, Vowles comes on the radio and says: "Going to do it now."

Both Mercedes drivers are told they are pitting, and Bottas is told about the stacking plan. The team and the Finn are both aware of the danger that Vettel poses if he is delayed in the pits. Coming into the pits, the gap between the two drivers is 5.5 seconds

Hamilton's pitstop takes 2.9 seconds, and his total pitlane time is 23.597 seconds. Bottas' pitstop takes just 2.6 seconds and his total pitlane time is 24.083 seconds. Measurements confirm that just 3.4 seconds after Hamilton moves away from his stop, Bottas stops in the same spot.

Lap 37

The swift turnaround of Bottas means he leaves the pits with a five-second advantage over Vettel, which is cut back to four seconds at the end of the lap when the Ferrari driver sets the fastest lap.

Lap 38

Bottas responds with the fastest lap of the race at that point.