Novak Djokovic lost the first set to love against Thomaz Bellucci but hit back to win 0-6 6-3 6-2 and set up a clash with Rafael Nadal for a place in the Internazionali BNL d'Italia semi-finals in Rome.
World number one Djokovic held his arms aloft after holding serve in the first game of the second set, having lost the first in 24 minutes to the Brazilian.
Djokovic stepped up his game in the second, breaking Bellucci and serving out to take it 6-3 and and the tide was turned in the decider as the Serb cut out the mistakes to book a place in the last eight of the tournament for the 10th year running.
Nadal, currently the world number five, also fought back after dropping a first-set tie-break to beat Australian Nick Kyrgios 6-7 (7/3) 6-2 6-4.
Both players exchanged service breaks in the opening set and Kyrgios saved one set point at 4-5 before going on to win four straight points from 3/3 in the tie-break.
Nadal responded to open up a 5-1 lead in the second set before levelling the match and going on to break Kyrgios in the third match of a tough-fought decider.
Roger Federer's record streak of 65 consecutive grand slam appearances could be at risk as he struggled to overcome a back problem in a third-round defeat to improving Austrian Dominic Thiem.
Federer, clearly not 100 per cent fit in a 7-6 (7/2) 6-4 defeat to Thiem, pulled out of last week's Madrid Open but decided to play in Rome.
The Swiss, who had knee surgery in February before pulling out of his proposed comeback tournament in Miami through illness, is hopeful he will have enough time to recover for this year's second grand slam, which starts in 10 days.
Federer has not missed a grand slam tournament since failing to qualify for the US Open in 1999.
Thiem, up to 15 in the world rankings, will play Japan's Kei Nishikori, who beat Frenchman Richard Gasquet 6-1 6-4.
World number three Andy Murray cruised to a 6-0 6-4 win over France's world number 32 Jeremy Chardy to set up a last-eight clash with David Goffin. The Belgian will be full of confidence after routing the Czech Republic's Tomas Berdych 6-0 6-0 in 49 minutes.
Frenchman Lucas Pouille, granted a place in the main draw despite losing in the final round of qualifying due to Jo-Wilfried Tsonga's withdrawal, followed up his second-round win over Ernests Gulbis by upsetting Spanish ninth seed David Ferrer 6-4 6-1.
Pouille, 22, will now face Argentina's Juan Monaco after he upset Swiss Stan Wawrinka 6-7 (7/5) 6-3 6-4.
World number four Wawrinka edged the first-set tie-break but was stunned by the fightback of a player ranked 110 places below him.