Maria Sharapova suffered a first defeat since returning from a 15-month doping ban as Kristina Mladenovic beat her in the semi-finals of the Stuttgart Open.
Five-time Grand Slam winner Sharapova, 30, was up a set and a break but squandered it to lose 3-6 7-5 6-4.
Mladenovic, 23, faces German Laura Siegemund in Sunday’s final.
Having been given a wildcard entry, Russian Sharapova needed to reach the final in Germany to be eligible for qualifying for the French Open.
Her defeat means she will be outside the top 200 when the rankings are released on Monday, so she will need a wildcard to compete in qualifying or the main draw in the event in Paris, which starts on 28 May.
She will learn on 16 May whether she will be given a wildcard for either stage at Roland Garros.
Mladenovic holds her nerve
Sharapova, who has also received wildcards for forthcoming tournaments in Madrid and Rome, took complete control at the start of the contest as a second double fault gave her a 4-1 lead before sealing the first set in just 38 minutes.
She broke Mladenovic again at the start of the second set and looked to be cruising to victory, but despite conceding 11 double faults, the Frenchwoman improved her baseline game and fought her way back into the contest.
The world number 19 broke back and then held her composure to survive three break points to go 6-5 ahead before converting her first set point on Sharapova’s next service game.
The pair traded blows early in the third before Mladenovic grabbed a break to go 4-2 up and fought back from 0-40 to hold her serve.
Sharapova rallied to pull it back to 5-4, but Mladenovic was not to be denied her first win over the Russian and converted her first match point.
BBC tennis correspondent Russell Fuller:
The pressure told on Sharapova as the match got tighter – as you would expect it to after 15 months away. Mladenovic’s second serve was very vulnerable, but she showed huge heart to save 13 of 16 break points.
This has still been a very encouraging week for the former world number one: she will be just outside the top 250 when her name returns to the rankings on Monday and could yet make the cut for Wimbledon’s main draw. That will depend on how well she plays in Madrid and Rome and another semi-final appearance in either of those events might just do the trick.