British number one Emma Raducanu missed out on a place in the Madrid Open quarter-finals after Ukraine's Anhelina Kalinina edged a tense match which could have swung either way.
Raducanu, aiming for three straight wins for the first time since her 2021 US Open triumph, lost 6-2 2-6 6-4.
Ninth seed Raducanu, 19, seemed to have issues with her back and needed treatment at the end of the first set.
She showed determination to fight back but Kalinina regrouped to seal victory.
Raducanu saved a match point as Kalinina tightened up with victory in her sight, but hit long to give the Ukrainian another chance and then volleyed wide.
Despite the defeat, Raducanu smiled as she walked off court and will take positives from her time in the Spanish capital.
After only making her senior clay-court debut last month, the world number 11 is continuing to look comfortable on a surface which she believes she can thrive on.
The teenager, who is without a full-time coach after parting with Torben Beltz recently, also showed her ability to problem solve as she fought back against Kalinina in the second set.
Kalinina, ranked 37th after a rapid rise in the past year, broke to love in the first game of the match and continued to dominate with her powerful ball-striking, particularly causing Raducanu problems with her backhand.
Raducanu appeared to have issues with her back, often clutching the area with her hand, and needed treatment from the trainer at the end of the first set.
When she returned to court, Raducanu tweaked her strategy to combat Kalinina's heavy returning - and it paid dividends.
She mixed up her serving and landed 78% of her first serves, as well as making just one unforced error, to dominate the second set and force a decider.
Momentum swung again when Kalinina broke for a 2-1 lead, with further twists coming when Raducanu levelled at 3-3 and Kalinina broke again for 5-4 with a sensational crosscourt backhand winner.
That proved pivotal as Kalinina, who has now beaten three Grand Slam champions in Madrid after previous victories against Sloane Stephens and Garbine Muguruza, served out to set up a quarter-final against Switzerland's Jil Teichmann.