• Dutch driver finishes second but penalty moves him to fourth • Sebastian Vettel jumps up to second with Valtteri Bottas third

Sporting a helmet styled in the same design as Niki Lauda’s in his final championship winning season for McLaren in 1984, Lewis Hamilton delivered the win in Monaco he so dearly wanted to honour his friend. A victory ground out though tense, nerve-racking effort, of sweat and seat-of-the-pants determination, it is surely one Lauda would have admired and acknowledged as thoroughly deserved.

Hamilton had been emotional after taking pole and was once more moved to dedicate his win to Lauda as he celebrated with relief as much as ecstasy, that included hurling himself into the swimming pool at the harbour’s edge. He described it as his hardest race and, while it was certainly not the most thrilling, he had to remain inch-perfect and fully focused from flag to finish. Grinding out a win on the wrong tyres, despite being harassed by Max Verstappen to the end, was exactly the sort of dogged indefatigability that Lauda displayed and had admired in Hamilton.

F1: Lewis Hamilton wins Monaco Grand Prix – as it happened Read more

“That was definitely the hardest race I’ve had but nonetheless I was fighting with the spirit of Niki,” Hamilton said. “He’s been such an influence in our team and I know he will be looking down and taking his hat off. I was trying to stay focused and make him proud.”

He took the win from pole in front of Ferrari’s Sebastian Vettel in second and his teammate, Valtteri Bottas, in third. Red Bull’s Verstappen was in fourth after finishing second on track, harrying Hamilton to the flag. But he had incurred a five-second penalty for an unsafe pit release and that demoted him. The win gives Hamilton a 17-point lead over Bottas in the championship and puts him 55 points clear of Vettel.

He led off the line but it was the pit-stops that defined the shape of the race. Charles Leclerc had prompted a safety car because of debris when his charge from 15th on the grid came to an end with a puncture attempting to pass Nico Hülkenberg at Rascasse. The leaders all came into the pits but Hamilton was the only one to take the medium rather than hard tyres. He had 68 laps to make it to the end.

During the stops Verstappen was released from his box into Bottas’s path, the pair touched and the Dutchman squeezed Bottas into the wall. Verstappen came out in second on track and, with a puncture, Bottas returned to the pits immediately. The unsafe release by Red Bull was investigated by the stewards and Verstappen was given the penalty.

Lauda won twice in Monaco and his qualifying lap here in 1975 was so intense he said he was left trembling at its conclusion. Hamilton endured a similarly tense encounter. He has not enjoyed the greatest success on the streets of Monte Carlo. This is his 77th career win but only his third here, where he lives and where, after these efforts, he will have slept particularly soundly.

Facebook Twitter Pinterest Lewis Hamilton leads Max Verstappen around a hairpin turn. Photograph: Boris Horvat/AFP/Getty Images

Untroubled for the first third, he soon began to air concerns that his tyres were wearing. He has done the same thing before, only to remain in sublime control, but this time the graining on his left front was clear.

A race so often a procession that did indeed present a train of four cars at the front now had a genuine element of jeopardy. As Hamilton grew increasingly fraught over the radio and his engineers did their best to calm his fears, it was clear they would not blink and pit him. The British driver had to hold his line and execute every lap to perfection without offering a sniff of a chance to Verstappen.

When Ayrton Senna proved he was only too human at 1988 Monaco Grand Prix | Giles Richards Read more

By the halfway point spots of rain failed to materialise into anything more and Hamilton was looking to save his rubber with a positively pedestrian pace. He revealed that, despite his concerns, he had not considered coming in.

At the Chinese Grand Prix in 2007, his rookie season, when McLaren left him out too long on deteriorating rubber Hamilton spun off at the pit entrance costing him his chance to win the title at that race, a moment he has not forgotten.

Quick guide Follow Guardian sport on social media Show Hide Twitter: follow us at @guardian_sport Facebook: like our football and sport pages Instagram: our favourite photos, films and stories YouTube: subscribe to our football and sport channels Photograph: Chesnot/Getty Images Europe

“I’ve not driven on empty tyres since 2007 when McLaren left me out in Shanghai for such a long time,” he said. “It was intense. I was never going to come in. I learnt the hard way, I wasn’t going to come in whether I crashed or finished.”

Verstappen, who drove superbly, was ceaselessly probing on rubber with more grip. He made a final dramatic lunge at the Nouvelle chicane with two laps to go and the pair touched as the Dutchman darted up the inside but could not snatch the lead. Investigated, it was judged a racing incident.

Hamilton held his nerve and the lead. The chief strategist for Mercedes, James Vowles, pronounced it “a job no one else could have done”. The Mercedes team principal, Toto Wolff, perhaps summed up the feelings of Hamilton and his team. “A world championship drive for a world champion that isn’t among us any more,” he said. “With all the drama that we’ve had, I’m relieved it’s over.”

Pierre Gasly was in fifth for Red Bull and he took fastest lap. Carlos Sainz in the McLaren did very well for sixth, Daniil Kvyat in the Toro Rosso was in seventh, with another strong finish for the British-Thai driver Alexander Albon in eighth for Toro Rosso. Daniel Ricciardo was in ninth for Renault and Grosjean was in tenth for Haas.