Hamilton initially led the Grand Prix and looked set to take the ninetieth win of his F1 career until he was awarded a ten-second stop-go penalty for entering the pit lane when it was closed to recover the Haas of Kevin Magnussen, who had broken down at the entry of the pit lane.
The Mercedes driver was then able to recover from being twenty-six seconds behind the pack to take seventh at the chequered flag, a result which he claimed he enjoyed battling back through the field in the closing laps to move back into the points.
"Well, firstly I need to say a huge congratulations to Pierre, because that was a fantastic result for him," Hamilton commented.
"I've obviously seen what he's been through, having been dropped from a top team and now he has beat the top team. I think it's just fantastic for him to see him grow. I'm generally really happy for him.
"My race, it wasn't meant to be today. It was a bit unfortunate but what doesn't kill you will only make you stronger. It was a long pitstop, twenty-six seconds I had to catch up but nonetheless when I caught everybody, I enjoyed that bit of a battle.
Bahrain International Circuit - Winter testing