Grigor Dimitrov fought back to beat top seed Carlos Alcaraz in three sets and reach the quarter-finals on Wednesday in the latest upset at the Shanghai Masters. The 18th seed won 5-7, 6-2, 6-4 against an out-of-sorts Alcaraz as the Bulgarian steps up his pursuit of a first ATP title since 2017. He will next face the 22nd-seeded Nicolas Jarry after the Chilean defeated wild card Diego Schwartzman 6-3, 5-7, 6-3. The first Shanghai Masters since the pandemic has opened up for Dimitrov after the exits of Daniil Medvedev, Stefanos Tsitsipas, Holger Rune and Jannik Sinner. Russia's Andrey Rublev is the highest remaining seed left in the draw at five. World number one Novak Djokovic is not in China. "I'm still here, I'm not going anywhere," the 32-year-old Dimitrov said after dismissing Alcaraz. Spain's Alcaraz, the world number two, was chasing a seventh tour-level title of the season but he uncharacteristically crumbled after winning the first set. The 20-year-old Alcaraz took time to find his range and Dimitrov broke for 3-2 in the first set with a vicious whipped forehand return. Dimitrov was broken back as he served for the set in a riveting 10th game involving two thrilling rallies that both times saw Alcaraz come out on top. Alcaraz held and then broke again to wrap the set up in just under an hour. But rather than power on to victory, Alcaraz let the match get away from him. The clean-hitting Dimitrov gathered himself to race into a 2-0 lead in the second set, then broke again for 5-2, before sealing the set when Alcaraz shanked his return. They went to a decider and an unusually flustered Alcaraz was broken in the third game after yet another unforced error. Alcaraz let out a roar of anger as the match slipped away from him. Dimitrov held his nerve to serve out his first victory over the Spaniard on his second match point. "I knew what I had to do," said Dimitrov. "I knew I had to apply constant pressure against him. "Even if I was down, even if my shots were not good enough, I had to put him in uncomfortable positions. He doesn't like being on the back foot." Alcaraz, who had been the favourite for the Shanghai crown in Djokovic's absence, said he had always been up against it. "He was on another level today, this Grigor," said Alcaraz, who lost to Sinner in the semi-finals in Beijing and won't look back on his visit to China with much fondness as a result. "I was all the time defending, I could not find the way to put myself in a position to attack." The efficient Rublev beat the American 12th seed Tommy Paul 7-5, 7-5 in their last-16 encounter in the late-night match. Rublev meets Ugo Humbert of France in the quarter-finals after the 32nd seed demolished J.J. Wolf, also of the United States, 6-1, 6-2 in just 57 minutes.