HALLE, Germany (AP) Roger Federer's bid for a ninth title at the Gerry Weber Open came to an end Saturday when he was beaten in the semifinals by Alexander Zverev, a rising German prospect who notched the biggest win of his young career.

Zverev's 7-6 (4), 5-7, 6-3 victory over the top-seeded, eight-time defending champion gave him a place in his first final of the year. He will meet Florian Mayer, who beat third-seeded Dominic Thiem 6-3, 6-4.

It also means that Federer, with 17 Grand Slam titles, still remains without a title in a year marred by knee surgery and a back injury that forced him to miss the French Open.

Federer failed to reach the final in Halle for the first time in 11 straight appearances at the grass-court event. Federer's eight titles in Halle are already a record.

''I haven't really grasped it yet,'' Zverev said. ''That I would be standing here as a winner, I couldn't have imagined it yesterday.''

The 19-year-old Zverev was one year old when Federer made his debut on the tour. He is the first teenager to defeat Federer in nearly 10 years, since the Swiss fell to Andy Murray in Cincinnati in 2006.

At No. 38 Zverev is the highest-ranked teen on the tour. He lost to Federer when they met for the first time at the Italian Open on clay in May.

Neither player faced a break point in the first set and Zverev fired an ace to set up a set point, using it immediately. Federer, ranked No. 3 in the world, had won 15 straight sets previously in Halle.

Federer got the first break of the match at 5-5 in the second set with a masterful drop shot as Zverev slipped at the baseline.

Zverev got the break he needed in the third set when Federer sent a backhand very wide to fall behind 4-2. The German finished with 39 winners, including eight aces, and saved six of seven break points. He clinched the match with a service winner.

Zverev and Mayer will play the first all-German final in Halle since 2011.

Mayer, who went through a long break because of an adductor tear, is in his first final since winning his only title in Bucharest in 2011.

Thiem, a semifinalist at the French Open, won his first title on grass in last week's Mercedes Cup in Stuttgart.