SHANGHAI (AP) — Novak Djokovic, his serve broken twice early in the first set, rallied past Gael Monfils 6-7 (4), 6-2, 6-4 Friday to reach the Shanghai Masters semifinals.

Djokovic, the defending champion, next plays Jo-Wilfried Tsonga, a 6-2, 6-3 winner over Florian Mayer. Juan Martin del Potro also advanced, beating Nicolas Almagro 6-3, 6-3. Del Potro will meet Rafael Nadal or Stanislas Wawrinka in the semis.

Djokovic hadn't been broken in his two previous matches in Shanghai. But he dropped serve twice in the first three games against Monfils. After taking the first set, however, the 42nd-ranked Monfils struggled with abdominal pain and couldn't break the Serb again.