LONDON (AP)—Novak Djokovic will finish the year as the top-ranked player in the world.

The ATP says the Serb clinched the year-end top spot after No. 2 Rafael Nadal lost in the third round at the Shanghai Masters on Thursday.

Nadal's loss to Florian Mayer ensured that Djokovic cannot be overtaken before the end of the year.

The 24-year-old Djokovic becomes the first player other than Roger Federer or Nadal to finish a year as No. 1 since Andy Roddick of the United States in 2003.

Djokovic has been No. 1 since winning Wimbledon in July. He's won 10 titles this year, including his second Australian Open and first U.S. Open.