BASEL, Switzerland (AP) -- Teenager Borna Coric upset second-seeded Rafael Nadal in straight sets Friday to reach the semifinals of the Swiss Indoors and announce himself as one of the rising stars of tennis.
There was no such slip-up for Roger Federer as the top-seeded Swiss remained on course for his sixth title in Basel after beating fifth-seeded Grigor Dimitrov 7-6 (4), 6-2.
Nadal, who announced after the match he will have season-ending appendicitis surgery and was playing just his third tournament since Wimbledon due to a wrist injury, looked nowhere near his best while Coric was in sparkling form to win 6-2, 7-6 (4).
''It was difficult in the whole match, in the whole tournament,'' Nadal said. ''Every day I felt more tired, I tried to practice, to get fit but it was not possible. The past four, five months have been very tough for me. It's been difficult to play and compete.''
It took the 17-year-old Croatian just 35 minutes to take the opening set, after storming into a 5-0 lead to stun the crowd.
''It's an unbelievable feeling,'' Coric said. ''I'm so proud of myself and I hope I can play the same game tomorrow.
''There was pressure but I didn't have anything to lose, because if I lose I lost to the No. 1 in the world. I never played against him so I didn't know what would happen, whether he would kill me or not.''
Nadal, who made 19 unforced errors in the first set, rallied briefly and broke Coric's serve before holding to love.
The Spaniard recovered somewhat in the second set, but Coric - ranked 124th in the world - matched his illustrious opponent shot for shot during some long rallies that had the crowd cheering in delight.
Both saved a break point apiece to force the set into a tiebreaker. Coric racked up two match points but needed just one to seal the greatest win of his short career.
Nadal needed treatment for appendicitis this month in Shanghai and said he will have surgery on Nov. 3, ruling him out of next week's Paris Masters and the season-ending ATP finals in London.
''There is nothing frustrating for me in losing today,'' Nadal said. ''I knew it was going to happen. Either today or earlier in the week or tomorrow. ... I will be back at the beginning of 2015 and I will be ready for everything.''
Coric next plays David Goffin after the Belgian kept up his remarkable form to beat fourth-seeded Milos Raonic of Canada 6-7 (3), 6-3, 6-4.
Federer faces Ivo Karlovic in the other semifinal after the eighth-seeded Croatian beat Benjamin Becker 6-4, 6-4.
Federer, who beat Dimitrov at the same stage last year, saved four set points in the final game of the first set and then comfortably won the tiebreaker. He broke at the first opportunity in the second set to take a commanding lead which he never let go of. He broke again to seal the win after calling a halt in the middle of match point and asking for a review, which showed that Dimitrov had hit his shot long.
''I think the level was high from both of us,'' Federer said. ''It was a tough end to the first set and I was happy to come through there. Overall it was a good performance and I think the best tennis I've played this week so I'm very pleased.''
Goffin earned his 42nd victory in 44 matches since his straight-sets loss to Andy Murray at Wimbledon, but his first against a top-10 player.
''It's one of my nicest victories, if not the nicest,'' the seventh-seeded Belgian said. ''It's really pleasing. I can't really comprehend what I've achieved since Wimbledon.''
Goffin broke early on but was broken back when serving for the opening set, shortly after some lights went out and halted the match for approximately 20 minutes.
Goffin saved another break point at the start of the second set before breaking in the penultimate game to leave him serving to level the match.
The Belgian took a decisive lead in the seventh game of the final set and he threatened to break again but Raonic saved two match points - one with his 21st ace.
Goffin finally converted his fourth match point when Raonic returned a powerful serve long.