Fabio di Giannantonio denied championship leader Francesco Bagnaia in the dying stages to claim his maiden MotoGP victory at the Qatar Grand Prix.
Title rival Jorge Martin won Saturday's sprint race to cut the gap to defending champion Bagnaia to seven points.
And although Gresini Racing rider Di Giannantonio took on fellow Italian Bagnaia to win on Sunday, Spaniard Martin finished a lowly 10th.
Ducati's Bagnaia now leads Martin by 21 points with just one race remaining.
The 26-year-old can secure back-to-back world titles in the sprint at the season-ending Valencia Grand Prix next weekend.
Luca Marini had earned pole position, with Bagnaia and Martin starting fourth and fifth on the grid respectively.
And while Bagnaia had the perfect launch to take the lead from Marini going into turn one, Martin nearly lost control of his Ducati Pramac because of a wheelspin.
He dropped back before struggling throughout with only Di Giannantonio, who came second in Saturday's sprint, able to keep up with Bagnaia.
As it stands, Di Giannantonio does not have a MotoGP seat next season and the 25-year-old threw caution to the wind at the floodlit circuit in Lusail.
Bagnaia went off the track after his compatriot overtook with four laps to go, but the reigning champion recovered to finish second while Marini of VR46 Racing finished third.
"We managed to do a great start and I tried to push, but Digi was incredible," said Bagnaia.
Di Giannantonio added: "I saw he was making little mistakes and I thought 'hey, maybe this is my opportunity'.
"It's been an incredible weekend. This is a real redemption, a revenge for myself, for everybody who doubted me. We did it - now I'm a MotoGP winner."
Surviving the cut-throat world of commercial TV: The Australian drama The Newsreader is back on air...
How could the mental health crisis be eased? Roman Kemp champions support for struggling young people