The oldest man in the draw, 34-year-old Lopez, who was a Dubai finalist in 2004 and 2008, led Djokovic 2-0 and 40-0 on the Serb’s serve, and although the top seed rallied to win that game, he called for the doctor.
It became clear that he had an eye problem, and although Djokovic continued to play the rest of the set, he shook hands with his opponent after being broken for the opening set.
He afterwards explained: “It’s an eye problem. I have had it ever since I arrived in Dubai. Started with an infection and then severe allergy. That’s what I was told. It’s gotten worse in the last two days, unfortunately.
“It’s the first time that I have had such a problem with the eye. It was unfortunate. It was ultra sensitive today, the lights, and just wasn’t to be.
“I’m really sad to finish the tournament this way. I apologise of course. I apologise to all the people who came in to watch the match. I apologise to the tournament director and everybody who came out to support me. You know, I’m really sad to end out the tournament this way, but I was forced to.”
Lopez was also disappointed: “It’s very sad when you play against one of the best players in the history of the sport and he has to retire the way he did. He told me he had an infection in the eyes since a few days already. I had no idea and I just went on court without knowing about his illness.
“I felt that he was taking risks a little bit more than normal in some of the points that we played, especially when I made the break. Then he was trying to be more aggressive. Seems like he was not taking care of his shots sometimes… So that’s why I kind of realised that something was going on.
Lopez will now play Marcos Baghdatis for a place in the final.
MORE: The latest tennis news