Sebastian Vettel has won the Monaco Grand Prix to extend his lead over Lewis Hamilton in the championship to 25 points.
Hamilton started only 13th at the Monte Carlo circuit, but recovered to finish seventh on an afternoon of damage limitation following his disastrous qualifying performance on Saturday.
Championship leader Vettel trailed pole-sitter Kimi Raikkonen for the opening phase of the race, but emerged from his one and only pit stop ahead of his Ferrari team-mate after stopping later.
Jenson Button, back in Formula One as a one-off replacement for Fernando Alonso, was involved in a hair-raising accident after he flipped Pascal Wehrlein's Sauber following an adventurous overtake in the closing stages of the race.
Wehrlein's car was resting precariously on its side on the entrance to the tunnel and the German was trapped in his seat.
The safety car was deployed, and when Wehrlein's car was rolled back on to its four wheels by the marshals, the 22-year-old mercifully emerged without any obvious injury. He walked away from his cockpit and was taken to the on-track medical centre for precautionary checks.
Button, in what is likely to be his last race, retired having sustained significant damage to the front left of his McLaren following the crash.
The race resumed six laps after the extraordinary incident, but Daniel Ricciardo, despite kissing the barriers at turn one, held off Valtteri Bottas and Max Verstappen to take the final spot on the podium, while Hamilton was unable to do anything about Carlos Sainz as he crossed the line in a lowly seventh place.
Button's crash with Wehrlein was the major talking point of a largely processional affair here at the principality, which ended with Vettel moving 25 points - the equivalent of a race victory - clear of Hamilton in the championship race.
Hamilton is a two-time winner in Monaco, but the 32-year-old Briton has mysteriously struggled with the handling of his Mercedes car this weekend. And following his troubled performance in qualifying, he had it all to do on Sunday at a track where is virtually impossible to overtake.
"Devastating"— Formula 1 (@F1) May 27, 2017
As Raikkonen led Vettel and then Bottas through Sainte Devote on an opening lap which passed without any incident, Hamilton progressed one place to 12th, and that is where he remained for much of the early knockings.
A gearbox failure for Renault's Nico Hulkenberg before Sergio Perez pitted for a new front wing promoted him to 10th, but the triple world champion, complaining of poor grip, was already 35 seconds behind race leader Raikkonen by the end of lap 24.
Raikkonen, who had started on pole for the first time in nearly nine years, bossed the early running, but Ferrari's decision to pit him five laps earlier than Vettel scuppered his hopes of winning.
Indeed it was Vettel who emerged comfortably ahead of his team-mate and, despite the late drama, that is how it remained.
It marked Ferrari's first one-two finish since 2010, but Raikkonen cut a dejected figure during the podium presentations.
Hamilton also chose to stop late into the race. The Briton was the last of all the drivers to take on fresh rubber which allowed him to move up into seventh.
The race had looked set to pass off without any notable incident before Button crashed with Wehrlein with 18 laps remaining.
The field bunched up under the safety car, but Vettel remained in charge of the race to strike a major blow to Hamilton's hopes of winning a fourth title.
British driver Jolyon Palmer finished one place outside the points in 11th, while Stoffel Vandoorne completed yet another poor afternoon for McLaren after he crashed out with 11 laps to run.
"It was a very intense race and I had to be patient," said Vettel. "The pace in the first stint was really tricky. The tyres started to slide. It was quite uncomfortable. But then I had a second attempt.
"I had a couple of laps where the car was feeling really good. I pushed everything I had because I knew there would be a chance to win. I was able to use that window and I came out ahead."
Raikkonen added: "I mean obviously it is still second place but it does not feel awfully good."
Nico Rosberg, the reigning world champion who was conducting the post-race interviews, said: "I know how it feels. "It is not a good feeling."