Novak Djokovic had to battle back from being bagelled in the first set to survive a potential shock in the third round of the Internazionali d'Italia against Thomaz Bellucci.
Defending champion Djokovic struggled for rhythm in an error-strewn opening set, winning just eight points as Bellucci - ranked 37th in the world - stormed to a 6-0 lead.
The world number one was forced to three sets by the Brazilian here last year and, knowing he would have to do so again, dug in to win his first game at the start of the second set, and that helped propel him on to force a decider.
Bellucci was unable to match the raised intensity of Djokovic, who powered through to complete a 0-6 6-3 6-2 triumph.
Djokovic was given little time to settle, with Bellucci forcing him deep and wide, where a missed forehand down the line handed the Brazilian a break in the first game.
The world number one's display was riddled with 16 unforced errors, and he failed to win a single game in the first set despite Bellucci hitting just two winners.
Djokovic needed three attempts to escape deuce and hold serve at the start of the second set, but when the game was clinched he celebrated with his arms in the air, and that seemingly shifted the weight from his shoulders.
Bellucci was unable to maintain his aggressive style and mistakes started increasing with the defending champion proving immovable.
A double-fault from the Brazilian gave Djokovic a 4-2 lead and Bellucci was forced into a decider with a sliced drop shot curling wide.
Bellucci went long at the end of a lengthy rally on break point at the start of the third set, and the Serbian took full advantage to set up a quarter-final meeting with Rafael Nadal.