British number one Cameron Norrie beat Marton Fucsovics to set up an Italian Open last-16 meeting with world number one Novak Djokovic.
Norrie came through 6-2 7-6 (7-4) in a match that had been held over following Saturday's rain interruptions in Rome.
Norrie had led by a set and 5-1 but was pegged back by the Hungarian before digging deep again to win.
Djokovic overcame Grigor Dimitrov 6-3 4-6 6-1 after seeing a 4-2 second-set lead disappear.
World number one Iga Swiatek eased into the last 16 in the women's event but sixth seed Coco Gauff was beaten.
Norrie, the 13th seed, looked strong from the start against his opponent, ranked 92nd in the world, and broke for an early 3-1 advantage and built on that, breaking again in the eighth game.
As the match went on, Fucsovics struggled on his serve and Norrie twice took advantage to go 5-1 up and within sight of victory.
However, out of nowhere, the British number one started to struggle as the Hungarian staged a mini revival, twice breaking Norrie as he served for the match and saving five match points - four on his own serve - on his way to levelling it at 5-5.
Norrie held his nerve to go 6-5 up but his opponent levelled again to force the tie-break.
Despite losing the first two points and then going 3-1 down, Norrie started to show the aggression that had been lacking in the latter part of the set. He seemed to find another gear and went 6-3 up before winning on his seventh match point.