Sixth seed Kei Nishikori was eliminated from the Shanghai Masters on Thursday, losing in the third round to South Africa's Kevin Anderson.

In two sets that went the distance, Nishikori fell 7-6 (12-10), 7-6 (7-3). With neither player faced with a service break, Nishikori squandered a golden opportunity to take the first set when he was leading the tiebreak 6-5. On his 12th-seeded opponent's second serve, an unforced error cost Nishikori his best chance to stay in the match that lasted 2 hours, 8 minutes.

The second set developed the same way until Anderson converted a double break point on a Nishikori double fault to go up 5-4. Nishikori, however, inserted some drama by converting a triple break point on a double fault to break back and prevent Anderson from wrapping the match up easily.

The second tiebreak, however, was a one-sided battle. With a lot of support from the crowd, Nishikori hung on but couldn't turn the tide.

Anderson will next face 16th seed Jo-Wilfried Tsonga. The Frenchman knocked off Spanish qualifier Albert Ramos-Vinolas 7-6 (7-5), 7-5, 6-4.

In other third-round matches, world No. 1 Novak Djokovic defeated 15th-seeded Spaniard Feliciano Lopez 6-2, 6-3, while third seed Andy Murry of Britain needed three sets to defeat 13th seed John Isner of the United States 6-7 (4-7), 6-4, 6-4.