Safin is now one event away from ending his playing career
Former world number one Marat Safin has played his last competitive match in Russia after losing in the semi-finals of the St Petersburg Open.
He was beaten 6-4 4-6 6-4 by Ukrainian qualifier Andriy Stakhovsky in his final event on home soil before he retires at the end of the season.
Former US and Australian Open champion Safin, 29, has one tournament remaining on his schedule - the Paris Masters.
He will enter that event, starting on 8 November, on a wildcard.
Safin, who was playing in his first semi-final in 23 events, last reached a final at last year's Kremlin Cup.
He won back-to-back crowns in St Petersburg in 2000-01, among his 15 career titles - his last coming at the 2005 Australian Open.
Prior to this week, Safin's best effort this season had been to reach two quarter-finals.
"I've reached the semi-finals and it's a good result for my recent form," Safin said.
"I was serving bad through the entire match and I had to (take) risks and made too many unforced errors. Stakhovsky felt it and dominated the match."
Stakhovsky, the world number 93, said: "Safin was my idol when I began to play tennis.
"I will remember this match. I have never beaten a player who had won two Grand Slams."
In the doubles, Britain's Colin Fleming and Ken Skupski had a superb 6-4 3-6 10-6 win over Israel's Jonathan Erlich and Andy Ram, and will face Frenchmen Jeremy Chardy and Richard Gasquet in Sunday's final.