Having led away from pole at the start and controlled the opening stages of the race, Hamilton was all set to re-inherit the lead from Sebastian Vettel during the pit stop sequence when the Virtual Safety Car [VSC] was deployed to deal with Romain Grosjean’s stricken Haas.

A software glitch. That’s what Mercedes say cost Lewis Hamilton victory - and allowed arch rival Sebastian Vettel to capitalise - in the season-opening race in Australia.

Lewis did nothing wrong - it was down to a software bug or an algorithm that was simply wrong

It was at that point that the race was turned on its head as Vettel – much to Hamilton’s frustration and bemusement – was able to pit and re-join ahead of the Briton.

The world champion immediately asked his team if he had made a mistake by not hitting the target lap time Mercedes had given him. But Silver Arrows chief Toto Wolff later admitted the software the team has used for five years to simulate such scenarios had generated the incorrect figures, consigning Hamilton to a second-place finish behind Vettel’s Ferrari.

“We were trying to build enough of a gap to [Kimi] Raikkonen to avoid the undercut and we were trying to have enough gap to the Haas to have the Safety Car gap,” explained Wolff.

“Everything was under control. We took a bit of a risk of putting Lewis on a soft [tyre] to go to the end, but it was the only choice to avoid Kimi jumping us. The pace was good.

“Then we calculated the VSC gap which was needed [if one was activated]. Our computer said 15 seconds was the necessary time in order to jump us.

“The drivers oscillate within one second in the delta. Then suddenly the cameras showed us the pit exit. Sebastian came out in front of us. The software or system we have been using for five years just gave us the wrong number.

“Lewis did nothing wrong. It was down to a software bug or an algorithm that was simply wrong.”

Wolff said he felt Mercedes would have been able to make the required gap to cover off a Virtual Safety Car period had the software generated the right data.

“Lewis knew that he needed to make it to the end on the tyre and drove to the target and without that [glitch] we probably would have had the gap,” he said. “The only thing we could have done was try to push more after his pit stop and try to create a bigger gap.

“But knowing that the tyre needed to go another 40 laps or so it was very important not to stretch that too much and he was going quicker than Sebastian anyway. So the gap grew.

“And we knew that the gap was good enough that even under VSC we would still maintain the lead.

“If we knew it would have been three of four seconds more we would have pushed a bit more with the tyres with the risk at the end of the race - but we would have done it.

Despite losing out, Wolff said he had no frustrations with the way the VSC rules are applied.

“I think, like always in motor racing, with the VSC or normal Safety Car, sometimes you are lucky and sometimes it bites you. Today we were bitten. It’s very hard to take because we had the pace and for whatever reason – we need to find out – we lost the win.

"You know it’s these moments that make you stronger,” he added philosophically. “We got punched in the face today and we got punched in the face yesterday [with Valtteri Bottas’s crash], against everyone saying that we would run away easily with 20 victories or whatever. I always said that wouldn’t be the case – it is very close at the top and I guess that’s the message that everyone will want to here.”

Vettel's win meant it was the fourth time in five years that Hamilton has failed to convert pole to victory in Melbourne.