Defending champion Novak Djokovic recovered from a 3-0 deficit in the third set to defeat Nicolas Almagro 6-1, 4-6, 7-5 and reach the third round at the Madrid Open on Wednesday.

Djokovic rallied in the final set by breaking Almagro to go up 6-5 and served out to earn his 15th win of the season in over two hours.

The second-seeded Djokovic will next play either Gilles Simon of France or Feliciano Lopez of Spain.

Djokovic cruised in the first set by breaking the 76th-ranked Almagro three times. The Spanish wild card entrant rallied in front of the home crowd in the second set, saving all four break points he conceded and breaking at 4-5 to eventually extend the match.

It was Djokovic's first match since splitting with longtime coach Marian Vajda.