World Mo. 6 Matteo Berrettini had lost all four of his previous matches against the Serbian.
Novak Djokovic was stunned 7-6(4), 6-2 by Matteo Berrettini in the Qatar Open first round on Tuesday as the Italian enjoyed his first win over the former world number one.
Berrettini played superbly to knock out the twice champion in one hour 35 minutes to secure his first victory against a top 10 opponent since January 2023.
"It's something that I've been looking to do," said former world number six Berrettini, who had lost all four of his previous matches against the Serbian.
"I played against him in the most important tournaments on tour, had the honour and the pleasure to play against him. I wish I could have won one of those matches as well."
World number 35 Berrettini, voted the ATP's comeback player last year, faces Dutchman Tallon Griekspoor in the next round.
The 24-times Grand Slam winner Djokovic, aiming for a 100th ATP title, was playing his first singles match since retiring in the Australian Open semi-finals due to a hamstring injury.
The 37-year-old, who last week said he was "almost fully recovered", had not lost a first-round match since his 2022 Monte Carlo Masters defeat by Alejandro Davidovich Fokina.
Djokovic will now turn his attention to the doubles event, pairing up with Spaniard Fernando Verdasco against Finn Harri Heliovaara and Britain's Henry Pattem in the quarter-finals.
Meanwhile, No. 2 seed Alex de Minaur of Australia defeated Russian Roman Safiullin 6-1, 7-5 and No. 4 seed Daniil Medvedev eliminated defending champion and fellow-Russian Karen Khachanov 4-6, 7-5, 6-3.
Another Russian, fifth-seeded Andrey Rublev, was a 6-3, 6-4 winner over Alexander Bublik of Kazakhstan.
Hamad Medjedovic of Serbia knocked off sixth-seeded Stefanos Tsitsipas of Greece 7-6(6), 5-7, 7-6 (5) in a battle lasting two hours, 45 minutes.
Also advancing to the second round were Nuno Borges of Portugal, Italy's Luca Nardi, Tallon Griekspoor and Botic van de Zandschulp of the Netherlands, Zizou Bergs of Belgium and Felix Auger-Aliassime of Canada.
Rio Open
Top-seeded Alexander Zverev endured an up-and-down first set before emerging with a 7-6(4), 6-4 win over China's Yunchaokete Bu in the first round at Rio de Janeiro.
Zverev won the first three games of the match, then fell behind 5-4 before saving a set point on Bu's serve.
The German claimed the last four points of the first set tie-breaker, then got the only service break of the second set in the penultimate game.
In other opening-round action, fourth-seeded Francisco Cerundolo of Argentina beat France's Hugo Gaston 7-6(9), 6-0; fifth-seeded Sebastian Baez won an all-Argentine matchup against lucky loser Roman Andres Burruchaga 6-3, 7-5; and eighth-seeded Tomas Martin Etcheverry of Argentina got past France's Corentin Moutet 6-3, 7-6(1).
Another Argentine lucky loser, Camilo Ugo Carabelli upset seventh-seeded Pedro Martinez of Spain 4-6, 6-3, 6-3.
Also advancing were Italy's Luciano Darderi, Bosnia's Damir Dzumhur and Portuguese lucky loser Jaime Faria.