Sebastian Vettel ended his 13-month win drought with a controversial victory in the Singapore Grand Prix.
The German benefited from unusual Ferrari strategy to leapfrog team-mate Charles Leclerc into the lead.
Leclerc told the team over the radio that it was "unfair" and it will do little to reduce tension within the team.
But it was a much-needed victory for the four-time world champion who has had a difficult, error-strewn season and faced questions about his status and future.
- How close is Vettel to joining F1's hall of shame?
- Singapore GP full race results
- Listen: 'I don't totally understand the undercut' - Leclerc
The German has continued a run of one major driving error every three races since June last year, and seen Leclerc, already a two-time winner in his first season at Ferrari, emerge as a serious threat to his position as number one in the team.
But Leclerc was very unhappy and made his feelings clear.
Ferrari's strategy, however, did secure them their first one-two since the 2017 Hungarian Grand Prix and Vettel's first win since the Belgian Grand Prix at the end of August 2018.
And it pushed Lewis Hamilton, who started second in the Mercedes, down to fourth, behind Red Bull's Max Verstappen.
How did Vettel get ahead?
Vettel started third and his victory depended on a decision by Ferrari to stop him early, made to ensure he did not pit and come out behind Nico Hulkenberg's Renault, which had stopped for fresh tyres after a first-lap incident and was charging through the field.
It arose because the leaders were managing their pace to ensure they could make their one pit stop at the optimum time.
Seeing the risk from Hulkenberg to Vettel, the team pitted him on lap 19 and he rejoined in front of the Renault.
Ferrari pitted Leclerc, who had led the race from the start from pole position, next time around but Vettel's pace advantage on his first lap out of the pits on fresh tyres ensured he was ahead of Leclerc when the 21-year-old emerged from the pits.
"What the hell?" Leclerc said over the radio, almost certainly wondering why he was not pitted first.
His engineer told him: "It was the best we could do."
Leclerc said: "I just wanted to let you know my feelings. To be completely honest, I don't understand the undercut at all. But we discuss it later."
The double early stop for the Ferraris meant both drivers had to work their way past slower cars that had not yet made a pit stop, and Vettel did this to better effect than Leclerc, building a six-second lead by the time they were running one-two on lap 33, just after half distance.
The risk for Ferrari now was the threat from Hamilton, who had delayed his pit stop by six laps in an attempt to benefit from fresher tyres at the end of the race.
But three safety-car periods for a series of incidents between back markers gave Ferrari the slow laps they needed to be sure their tyres would make it.
At the final one, Leclerc asked for "everything" from the car to attack Vettel, but he was told he needed to manage the engine and bring the car home - code for him to hold position behind his team-mate.
How Hamilton's race unravelled
Hamilton was running a close second behind Leclerc in the early laps, as the leaders lapped 13 seconds off their qualifying times to ensure their tyres went as long as necessary.
But he was undone by Ferrari's strategy gamble.
When Vettel pitted, Hamilton said to his team they should try to "undercut" Leclerc in the same fashion but that opportunity was removed when Leclerc stopped on the very next lap.
That gave Mercedes no option but to run Hamilton long and attempt to attack on fresh tyres later in the race.
But the strategy also dropped him behind Verstappen's Red Bull, and his tyre advantage - only a handful of laps - was not enough to enable him to try to pass cars on a track where a car is said to need a 2.4-second pace advantage to overtake.
Hamilton even needed help from team-mate Valtteri Bottas, who pitted earlier and was told to back off to slow Red Bull's Alexander Albon, whom Hamilton would otherwise have come out behind.
But his championship lead over Bottas, who finished behind him in fifth, was extended to 65 points, and it remains only a matter of time before he wins a sixth world title.
Behind Bottas, Albon drove a strong race in the Red Bull, albeit his real pace was not that clear because of the tyre-management aspect of the race.
And Lando Norris drove well to take seventh and best of the rest for McLaren, ahead of Toro Rosso's Pierre Gasly, Hulkenberg and the Alfa Romeo of Antonio Giovinazzi at the end of a race that was soporific at the front but contained some harum-scarum racing in the midfield from time to time.
The incidents that brought out the safety car were a crash between Haas' Romain Grosjean and Williams' George Russell on the exit of Turn Eight on lap 35; a retirement that stranded Sergio Perez's Racing Point on track on lap 39; and a collision between Daniil Kvyat's Toro Rosso and Kimi Raikkonen's Alfa Romeo when the Russian dived for a pass at Turn One on lap 50.
Driver of the day
What happens next?
Russia in a week's time. Three wins in a row; can Ferrari make it four? Mercedes will be determined to bounce back after the self-confessed errors of Singapore.
What they said
Vettel: "First of all, big congratulations to the team - the start of the season has been difficult for us then we started to come alive and I'm really proud of everyone's work back home. I really want to thank the fans over the last couple of weeks. We haven't been the best and it's happy to get so many letters and nice messages, and it gives me lots of strength and belief and I put it all into the car today."
Leclerc: "Obviously it is always difficult to lose a win like that but at the end it's a one-two for the team so I'm happy for that, our first of the season. I'm disappointed for me but I will come back stronger. It looks a lot more positive than expected, they've [the mechanics] done an amazing job."
Verstappen: "The whole race went well. At the beginning it was really slow and everyone was close together then I started to struggle with the tyres and we boxed and it was a good call. We undercut Lewis and from there it was about managing the tyres."