Laura Robson missed the chance to reach the quarter-finals of the WTA Madrid Open after going down 5-7 6-2 7-6 (7/5) to Ana Ivanovic.
Having beaten Agnieszka Radwanska in the previous round, the British no 1 looked on course to reach the last eight of a premier event on the WTA Tour for the first time in her career when she took the opening set.
Robson, who is looking for a new coach after parting company with Zeljko Krajan, was pegged back in the second by her Serbian opponent, only to then take a commanding 5-2 lead in the decider.
However her serve let her down as she was unable to get over the line, eventually losing a third-set tie-break after two hours and 13 minutes on court.
Her service issues had been there from the outset as she was broken immediately, though the 19-year-old left-hander hit back to get on level terms before taking the set in the 12th game.
The second set followed a similar pattern with the players trading breaks until Ivanovic opened up a 3-1 lead. The former world no 1 got a double break to go 5-2 ahead as she made sure the match would go the distance.
Both had their chances to serve out for the match in the third; Robson failed to do so in the ninth game, but then showed tremendous courage to make it six games apiece by breaking to love.
But Ivanovic finally clinched victory at the second attempt when her rival weakly hit a second serve into the net, ending a see-saw match that contained 83 unforced errors and 15 breaks of serve in total.
Angelique Kerber, who saw off 2009 French Open champion Svetlana Kuznetsova 3-6 6-4 7-5, is next up for Ivanovic.