(CNN) -- Top seed Novak Djokovic is through to the quarterfinals of the Marseille Open, but he was made to fight for his victory by Czech Jan Hernych, before going through in straight sets.
Djokovic was made to battle against an opponent who had beaten him in their only previous meeting.
The world number three was forced to break serve twice, once in each set, before securing a 92-minute 6-4 7-5 success over a player he had lost to in their only other previous meeting in 2006.
"It was a strange match with lots of ups and downs regardsing my game," Djokovic told the official ATP Tour Web site.
"I was a break up in both of the sets so I should have finished the job earlier but im happy to get through in straight sets."
Djokovic returned to action with a straight sets victory over recent Johannesburg finalist Jeremy Chardy on Wednesday.
The Serb is contesting his first tournament since retiring with a heat-related illness against Andy Roddick in the quarterfinals of the Australian Open in January.
Looking ahead to his quarterfinal against Germany's Mischa Zverev, Djokovic said: "He has a lot of touch and great talent. He doesn't really have a powerful stroke but he's very solid from both sides so it's a tough one for me."
Meanwhile, three Frenchman are also through to the quarterfinals of the tournament to delight the home crowd. Unseeded Julien Benneteau reached his second successive quarterfinal after defeating Swiss George Bastl 6-2 1-6 6-2.
Second seed Gilles Simon stuttered in the second set before edging past Germany's Rainer Schuettler 6-4 4-6 6-2 while fourth seed Jo-Wilfried Tsonga progressed after enjoying a comfortable 6-3 6-2 success over Simone Bolelli of Italy.