Novak Djokovic survived a very close first set against Serbian compatriot Filip Krajinovic before moving through to the quarter-finals of the Italian Open in Rome.
The world number one has not lost to a countryman since 2012 but that looked a real possibility when Krajinovic, who has improved substantially this season, led 4-1 in the first-set tie-break.
However, Djokovic toughed out the 87-minute set and broke serve twice in the second in a 7-6 (7) 6-3 victory.
The top seed said: “It was definitely one of the longest sets I think I have ever played. Never easy, I think, emotionally to play against someone that is one of my best friends for many years.
“I knew he’s in great form and, obviously, my second match on clay, I still haven’t started this match the way I really wanted to. I made a lot of unforced errors, but also credit to him for being aggressive and pushing me to the limit.
“I think the first set could have gone a different way, as well. Fortunately for me it went my way and that has allowed me to swing through the ball a bit more in the second set.”
In the last eight, Djokovic will face German qualifier Dominik Koepfer, who ended the brilliant run of 18-year-old Italian Lorenzo Musetti with a 6-4 6-0 victory.
Musetti came through qualifying and beat Stan Wawrinka and Kei Nishikori in his first two main-draw matches but ran out of steam here.
Rafael Nadal remains on course for a 10th title in Rome after a 6-1 6-3 victory over Serbian Dusan Lajovic.
After losing just two games against Pablo Carreno Busta, Nadal was dominant again apart from a blip in the second set when Lajovic recovered from 4-0 to 4-3.
Fourth seed Matteo Berrettini battled past wild card Stefano Travaglia 7-6 (5) 7-6 (1) and will take on Casper Ruud, who was a 6-2 7-6 (6) winner over Marin Cilic.
Denis Shapovalov recovered from a set down to see off Ugo Humbert 6-7 (5) 6-1 6-4 while Grigor Dimitrov defeated young Italian Jannik Sinner 4-6 6-4 6-4.