The Spaniard’s last game came at the Mallorca Open where he lost 6-2 6-4 to Yannick Hanfmann in the quarter-final.
After the match a tribute was paid to Lopez on court – a video montage showing his various career highlights.
The veteran teared up as he watched his best moments alongside his family.
Lopez’s crowning achievement came in 2009 when he helped Spain win the Davis Cup with doubles wins in the quarter-finals, semi-finals, and finals.
He also won the 2016 French Open men’s doubles alongside Marc Lopez, beating brothers Bob and Mike Bryan in the final.
Lopez narrowly missed out on an Olympic medal at London 2012 after losing the men’s doubles bronze medal match against France.
In singles Lopez won seven ATP titles including victories at Queen’s Club in 2017 and 2019 and at Eastbourne in 2013 and 2014.
The left-hander also became something of a cult figure at Wimbledon, which was his highest-performing grand slam.
Lopez reached the quarter-final at SW19 on three occasions, the most recent of which came in 2011.
FREE BETS AND SIGN UP DEALS – BEST NEW CUSTOMER OFFERS
He finishes his career with the most wins on grass of any Spanish player with a total of 87, which is 11 more than the next best Rafael Nadal.
Lopez reached a career high ranking of 12 in 2015 and collectd around £14.7million in prize money over the course of his 26-year career.