Ferrari's Charles Leclerc passed title rival Max Verstappen three times on his way to a commanding victory in the Austrian Grand Prix.
Carlos Sainz was on course to make it a Ferrari one-two before he suffered an engine failure with 14 laps to go - the latest in a series for Ferrari.
Leclerc faced a tense final 10 laps with a sticking throttle, as Verstappen came back at him, but he held on.
Leclerc cut Verstappen's championship lead to 38 points, to revive his hopes.
And it moves him back ahead of Red Bull's Sergio Perez to second in the standings.
Lewis Hamilton took third for Mercedes after starting eighth for his third podium finish in a row as his season finally begins to come together. Team-mate George Russell followed him home in fourth place.
The end of the race was far tougher for Leclerc than it had looked like being for much of the afternoon as for the first time since the Australian Grand Prix back in April the Ferraris had definitely stronger race pace than Verstappen's Red Bull.
The Ferrari's sticking throttle - the accelerator was not returning to zero when Leclerc lifted off - was also affecting the gearbox, as it refused to make some shifts because of the initial problem.
But Leclerc managed the problem well, despite expressing nerves and concern over the radio, to take his first win since Melbourne.
Since then, he has faced a brutal run of results, featuring two engine failures and two victories lost to strategy errors, as well as a start from the back, allowing Verstappen to build a significant advantage.
But this was Ferrari's most convincing result for two months and their pace in the race, although unexpected, will increase their confidence that they can come back at the Dutchman over the remainder of the season.
The relief was palpable in Leclerc's voice after the race, as he exhaled deeply, before saying: "Yes. Yes. I was scared. I was so scared."
Once out of the car, he added: "I definitely needed that one. The last five races have been incredibly difficult for me but also for the team, and to finally show we have the pace in the car and can do it was incredibly important."
Ferrari enjoy clear pace advantage over Red Bull
Leclerc passed Verstappen three times en route to victoryFerrari's speed came as something of a surprise on a track where Red Bull have been so strong in recent seasons.
Leclerc tracked Verstappen from the start of the race before making a superb overtaking move with a late dive down the inside of Turn Three on lap 10.
Three laps later, Verstappen pitted - very early - as Red Bull switched to a two-stop strategy in the hope of challenging Ferrari.
But as the race developed, it became clear the Ferraris were just too fast.
Leclerc pitted for the first time 13 laps later than Verstappen. He emerged 6.2 seconds behind and was soon closing in, passing the Red Bull - with relative ease this time - just nine laps later.
At that stage, the question was whether Ferrari would stick with the one-stop strategy, but after Verstappen pitted for a second time three laps after losing the lead, Leclerc himself made a second stop - again 13 laps after Verstappen.
This time, he emerged only 1.4secs adrift, and passed Verstappen for the lead again four laps later.
Verstappen was now left to try to fend off Sainz, who was rapidly closing in on the Red Bull and was shaping up for a move when his engine failed on lap 57.
It was another reliability concern for Ferrari, after the problems that have been faced by Leclerc and a number of the other cars powered by their engines, and it also meant Verstappen could cut his loss to Leclerc to the absolute minimum despite his weakest race for some time.
Another podium for Hamilton
Hamilton salvaged a podium finish from a difficult weekend that saw him crash in qualifying and collide with Pierre Gasly at the start of the sprintHamilton bided his time in the early laps, in what is known as a DRS train behind slower cars, but made up ground by staying out as others were triggered into pit stops by Verstappen's early stop.
Soon, the seven-time champion was running in clear air, and when he stopped for the first time a lap after Sainz's Ferrari had made its first stop, he had only Esteban Ocon's Alpine ahead, passing it two laps later to seal the fourth place that became third on Sainz's retirement.
Ocon took fifth, ahead of Haas' Mick Schumacher, who took his best F1 finish in sixth, Lando Norris's McLaren, the second Haas of Kevin Magnussen and Daniel Ricciardo's McLaren.
Fernando Alonso made a late second stop for medium tyres and fought past Alex Albon's Williams and then the Alfa Romeo of Valtteri Bottas to take the final point after starting from the back of the grid.
Perez's hopes were dashed by a first-lap collision with Russell, for which the Briton received a five-second penalty, and the Mexican later retired after making no significant ground.
More to follow.