Sebastian Vettel has won the Monaco Grand Prix to extend his lead over Lewis Hamilton in the championship to 25 points.
The German became the first Ferrari driver since Michael Schumacher in 2001 to win the showcase race in the principality.
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.
"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."