The two drivers pushed each other all the way as the Bahrain Grand Prix became a private battle between team-mates on a track which was staging its first night race to celebrate its 10th anniversary.
Such compelling fare was in stark contrast to events a week ago in Malaysia in which dissenters of Formula One were afforded further opportunity to criticise the sport. There were unlikely to be too many listening in Bahrain; spectators captivated instead by a race in which Hamilton won by just a second, his 24th career victory. It was also a second one-two for Mercedes as Rosberg took second place.
The team will take satisfaction in that but the events which led to the podium celebrations might also be considered an antidote to a sport which had become increasingly frustrating to spectators. Bernie Ecclestone, the F1 president, last week described the competition as "unacceptable" to the fans, but few would have felt disappointed at the weekend.
From the moment they locked out the front row - with Rosberg on pole by a quarter of a second from Hamilton - the prospect of a captivating battle was always on the cards. They traded momentum; Hamilton inching ahead of his team-mate on the run down to the first turn, with the two drivers battling ferociously as the first pit neared on lap 17.
Another pit later would prove instructive as to how they pair would pursue an advantage - Hamilton taking on a new set of the faster soft tyres, while Rosberg switched to the fractionally slower medium Pirelli rubber. It appeared that would prove crucial before, with Hamilton almost 10 seconds ahead of Rosberg after 41 laps, a moment of recklessness from Pastor Maldonado caused the wheels to come off their tactics.
Heading into turn one, the Venezuelan T-boned Sauber's Esteban Gutierrez, sending the Mexican into a somersault and forcing the safety car on to the track. Mercedes' drivers then pit again as Hamilton opted for the medium tyres and Rosberg the soft ones.
It forced both drivers to steady their ambition behind the safety car before Hamilton produced a superb performance on the slower rubber to keep Rosberg at bay. "I'm so grateful for the team to help me claim this win," said the Englishman.
"It was exciting. Nico drove fantastically well, very fair, and it was hard to keep him behind at the end. I was on a knife edge the whole time. It was a relief when I crossed the line."
Force India's Sergio Perez emerged the best of the rest, ahead of Daniel Ricciardo of Red Bull. The Australian also diced with team-mate Sebastian Vettel over the closing laps as he sought an improved finish. Vettel - the reigning world champion - had to settle for sixth behind the second Force India of Nico Hulkenberg, with Williams duo Felipe Massa and Valtteri Bottas seventh and eighth. As for Jenson Button, on the occasion of his 250th grand prix, he retired in his McLaren two laps from home.
Despite the fact he was runner up for the second consecutive race, with the gap between him and Hamilton now just 11 points, Rosberg expressed satisfaction at how compelling the race had been. "I strongly dislike coming second to Lewis, but on the other hand that was the most exciting race I've ever had in my career," said Rosberg.
"Today was a great day for the sport, and hopefully you had a lot of fun watching on television."