Mercedes said Sunday a software glitch may have cost world champion Lewis Hamilton victory after Sebastian Vettel’s Ferrari won the Formula One season-opening Australian Grand Prix.

Hamilton was in control of Sunday’s race until Romain Grosjean’s Haas stopped on track and officials imposed a Virtual Safety Car, which restricts the pace of the cars on track.

The VSC caused the field to slow while Vettel, who was leading courtesy of Hamilton’s earlier stop, was able to dive into the pits for fresh tyres and lose less time than under normal race conditions.

It meant Vettel emerged from the pits marginally in front of a startled Hamilton and held on to his advantage to the chequered flag for his third Australian GP victory.

“What just happened guys?” Hamilton queried his Mercedes team over radio during the race. “Why didn’t you tell me Vettel was in the pits?

“We thought we were safe, but there’s obviously something wrong,” the team replied.

“Did I do anything wrong? Should I have gone faster?” Hamilton pressed further.

Mercedes team principal Toto Wolff said an investigation would be needed to find out what happened.

“It’s very hard to take because we had the pace. For whatever reason, we need to find out, we lost the win,” Wolff told Sky F1.

“We thought we had about [a] three-second margin. I don’t know what happened to them, we need to ask the computers and that’s what we are doing. Whether we had a software problem somewhere, we need to fix it.

“I think the problem is within our systems. I think we have a bug somewhere that said 15 seconds is what you need, we had 12, it should have been enough but it wasn’t.”

Wolff said the lack of overtaking opportunities on the Albert Park street circuit also contributed to the galling defeat.

“Lewis was attacking flat out but you can see the overtaking is pretty bad here,” he said.

“Even the mega overtakers couldn’t make a pass. Lewis had to give up because the tyres wouldn’t have made it to the end.”

Mercedes’ former world champion Nico Rosberg said he was staggered by the team’s software problems.

“It’s unbelievable that Mercedes had a software glitch of five seconds. Five seconds is the world out there in F1. It’s a huge one and it cost them the win,” he said.

“It’s only the first race and Mercedes had awesome pace out there. Lewis, when he was pushing, he was fast. I don’t think it’s time to worry yet for Mercedes.”