Roger Federer beat Italian Potito Starace in the first round of his hometown Swiss Indoors event in Basle.
The 30-year-old, who was playing in his first match for six weeks, started slowly before winning 7-6 (7-3) 6-4.
Federer, now ranked fourth in the world, admitted he was not as sharp as he hoped after his break.
"Rust showed more on the returning side, trying to see the pace of the ball or being there and anticipating maybe was just missing a bit," he said.
Starace, ranked 54, created the only break point in the first set, which Federer saved before winning the set on a tie-break.
He immediately broke his opponent at the start of the second set and held on for victory.
Federer added: "In the second set I started to feel a bit better with confidence [with the] first set in the pocket, but I still thought Potito played a good match and made me work extremely hard."
It is the first match the Swiss star has played while ranked outside the top three since winning Wimbledon in 2003.
Meanwhile, Cyprus's Marcos Baghdatis beat eighth seed Viktor Troicki of Serbia 4-6 7-6 (8-6) 6-2.
And Kazakhstan's Mikhail Kukushkin, ranked 113th, used his reprieve as a lucky loser in qualifying to beat Donald Young of the United States 6-4 6-2.