Lewis Hamilton converted strategic brilliance into an exhilarating victory for Mercedes in Sunday’s Hungarian Grand Prix and said it was a triumph that would have delighted the late Niki Lauda.

Seven days after leaving Germany with a sore throat after his worst performance for the team, the championship leader bounced back to his best.

“Hats off to the team,” said Hamilton after the 81st win of his career and his record seventh in Hungary. “I think that if Niki was here now he would take his hat off.”

The former non-executive chairman of the Mercedes team Lauda always wore a scar-covering red baseball cap that he would doff to the team whenever they achieved a great success.

On Sunday, Hamilton was in second place behind Max Verstappen of Red Bull who, apart from few laps around the pitstops, had led from his maiden pole position until the final three laps.

Then the team made a key strategic decision.

So ragged and overwhelmed at Hockenheim just a week earlier, Hamilton and Mercedes made a gamble when they pitted unexpectedly for a second time with 20 laps remaining leaving the defending five-time champion to charge down a 20 seconds deficit on fresher and faster medium-compound tyres.

“Honestly, we’d had brake problems all weekend and I was a bit worried,” said Hamilton after a stirring triumph that has lifted 62 points clear of team-mate Valtteri Bottas in the championship with Verstappen third.

“I was actually doing a lot of coasting and not touching the brake for half the lap. I was just trying to save as much as I could. It was very difficult to get by. Their defence was great. They’re quite quick on the straights. I honestly didn’t know if I could catch that 19-second gap, as it’s big. But, like the team said, ‘just get your head down and keep pushing’’ which I did.”

Hamilton was full of praise for his team. A week on from their rain-swept and desultory exit from a near-disastrous German Grand Prix, they had clearly responded with a smart strategy, slick tactics and pitstops.

“I feel really grateful for the day and for the team who continue to believe in me. To take a risk, to take a chance on me,” said a clearly emotional Hamilton, having responded to days of speculation that Verstappen was poised to take over as the leading driver in the sport. “We’ve been together seven years and it never gets old. It feels like a new win for us all.”

Two-time champion Fernando Alonso, once his partner at McLaren, was thrilled by the race and used Twitter to convey his congratulations to both Hamilton and Verstappen. “Bravo,” he said. “Both impressive – thanks for the show.”

Verstappen conceded defeat gracefully. “Today we didn’t win, but it was a good day and a good weekend for us,” he said.

“Congratulations to Lewis. He was pushing me really hard. I like that and it’s still a good weekend for us. Second is OK and means a good haul of points. We were just lacking a bit of grip. We tried a one-stop and they had the opportunity for two and that worked out well for them.”