Mercedes struggled on Friday in Budapest, finishing fifth and sixth in both sessions with Hamilton 0.4s and 0.7s off the pace both times.

The Hungarian track is not best suited to Mercedes' design philosophy and Hamilton's title rival Sebastian Vettel appeared favourite for victory, before Hamilton took advantage of a wet qualifying session to claim pole and then commanded proceedings in the race.

Hamilton said: "From Friday to Saturday I made a big car change. I made a big change in FP1, because I was uncomfortable with the balance.

"It's difficult to make change in FP1 because you have to wait for the track to come to you rather than chase the set-up.

"I straight away made a big change but by the time I got to the end of FP2 I realised it wasn't the right direction so I had to pull back and go another way.

"We had a bit of running in P3 but the car still wasn't perfect and then it rained.

"I didn't make any changes [before qualifying] but I knew that Valtteri [Bottas] had had good P2 running and we weren't too far off in the direction that we ended.

"All the learning you do on a Friday, it wasn't perfect, the way you drive, the way you use the tyres, then you come back on Sunday and you have to bring your A-game.

"Friday is not usually the day I bring my A-game."

Hamilton was able to run until lap 25 on ultrasoft tyres, 10 laps longer than teammate Bottas.

That helped nullify the early-race impact of Vettel running an alternate strategy, because a short first stint from Hamilton would have locked the Briton into a two-stop and likely ceded track position to his title rival, who started on softs.

Unlike Bottas, whose early pitstop meant his tyres faded in the closing laps, Hamilton was able to make the one-stop strategy work and extended his championship lead to 24 points heading into the summer break.

"The ultrasoft lasted a lot better than I thought," Hamilton admitted. "I did struggle in FP2 but I was on a different set-up.

"I struggled at the beginning [of the stint of soft tyres] and then we got through some traffic and I moved a lot of switches around and was able to balance the car.

"After that I was able to do some decent times and pull the gap. I knew I'd need to pull the gap while they were still behind Valtteri.

"The strategy that Valtteri was on, it was highly unlikely that he was going to make it last.

"We knew that it [being on different tyre strategies] would also make it very difficult to win, even for me.

"I definitely don't think the team expected me to be able to eke out my first stint."