Feliciano Lopez's 26-year career ends in Mallorca with defeat to Yannick Hanfmann
The Spanish left-hander had delighted the home crowd with victories over Australians Max Purcell and Jordan Thompson but fell short against Germany's Hanfmann.
Lopez, who reached a career-high ranking of 12 and holds the record for appearing in 79 successive Grand Slam main draws, was cheered on by 22-time Grand Slam champion Rafa Nadal during his final event as a professional.
The three-time Wimbledon quarter-finalist will now focus on his new role as tournament director of the Davis Cup -- a competition he won four times.
Hanfmann, who also beat top seed Stefanos Tsitsipas at the Mallorca grasscourt event, will face Adrian Mannarino or Corentin Moutet in the semi-finals.