MADRID (AP) - Grigor Dimitrov stunned Novak Djokovic in the second round of the Madrid Open on Tuesday, beating the top-ranked Serb 7-6 (6), 6-7 (8), 6-3 for the biggest win of his career.

The 28th-ranked Bulgarian saved three set points in the first before taking the lead, and Djokovic then appeared to hurt his right ankle while trailing 4-2 in the second. The Serbian player slipped on the baseline and winced in pain, then immediately called for a trainer and took a lengthy break to get treatment.

The wait for the game to resume annoyed the crowd, which began chanting Dimitrov's name.

Djokovic said he had not prepared properly and credited his opponent with being the better player in the match.

Copyright 2013 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.