Invoking the spirt of his friend and mentor, the late Nico Lauda, Hamilton withstood the pressure from Max Verstappen and coped with worn tires. They would play a crucial role in the race as would Charles Leclerc who lined up 15th in the other Ferrari. "Ultimately as an athlete you want the toughest battles when they come".
Red Bull released Verstappen into the side of Bottas, giving the Finn a puncture, and forcing him to stop for a second time behind the safety auto, but this time for hard tires of his own.
"I know he will be looking down and taking his hat off".
"I think he would be happy today", he said.
The day belonged to both Hamilton and to the memory of the much-loved Lauda.
Hamilton has now won three times on the streets of the Mediterranean principality. Ferrari's Sebastian Vettel and Mercedes' Valtteri Bottas finished in second and third place respectively.
Before the race, drivers wore red caps for a minute's silence in Lauda's memory.
The miracle, with Hamilton wearing a red helmet with Lauda's name and colours while the auto carried a variety of tributes, duly happened as if by the late champion's celestial command.
"You know, this race - as you've seen in the previous years - lots of things get thrown at you so we've just got to stay on our toes", Hamilton said.
"It's a shame to get the penalty but I gave my all to get by Lewis", he said. "The lesson from here is that we're not yet where we want to be".
Leclerc eventually retired as his vehicle had been damaged by the flaying tire.
Former movie mogul Harvey Weinstein, accusers reach tentative compensation deal
He is said to be close to settling lawsuits brought against the television and film company co-founded by Weinstein . Mr Weinstein's team later told the Wall Street Journal that the size of the settlement would be approximately $44m.
Leclerc damaged his right rear tire trying a bold overtaking move on Nico Hulkenberg's Renault, scattering debris over the track and forcing the safety auto to come out.
Hamilton leads Bottas by 17 points in the drivers championship, while Mercedes is 118 points ahead of Ferrari on the constructors title table.
"Who's counting?" Vettel said in the post-race news conference, with a hint of sarcasm. The Dutchman was demoted to fourth, promoting Vettel and Bottas to second and third respectively. Mercedes responded by cranking Hamilton's power unit up too, but it didn't stop Verstappen from catching Hamilton on lap 70, and attempting a dive around the outside. Hamilton kept complaining about the state of his front left tire, but his team decided against a tire change because Verstappen - even though faster - had limited chances to pass on the sinewy 3.3-kilometer (2-mile) track.
Hamilton was losing grip and slipping around, but his team effectively made the right call in overruling him and keeping him on track.
Verstappen was given the penalty by race officials after his unsafe release from the pits earlier in the race.
Out came the safety auto, in went the leaders.
Race stewards handed Verstappen a paltry five-second time penalty for the incident.
Leclerc had made a thrilling start from near the back, overtaking the Haas of Romain Grosjean with a brilliant attacking move coming out of the turn at La Rascasse. "I tried everything but it's very hard in Monaco".
These fixed nothing; the Monegasque driver reported over radio that "the auto is very hard to drive" before pulling in at the end of his lap to retire the vehicle at his home race.
Although the 21-year-old Leclerc has time well on his side, he now must wait at least another year.
Sunday's race was the first since the death on Monday of the triple world champion, and Mercedes non-executive chairman, and was marked by tributes to the Austrian whose spirit hung over the pits and paddock.