Roger Federer came from a set behind to beat feisty Portuguese Rui Machado, ranked 90 places below him, as he made his Davis Cup return for Switzerland after an absence of nearly two years on Friday.
Federer, playing in front of a crowd which produced the occasional yodel but where cow bells were noticeably absent, faced 14 break points and produced 48 unforced errors in his 5-7, 6-3, 6-4, 6-2 win.
His win gave Switzerland a 2-0 lead on the first day of the European zone tie after Stanislas Wawrinka had beaten Frederico Gil in the opening match.
Federer, who has won 38 out of 49 rubbers (singles and doubles), last played for Switzerland in a playoff against Italy in 2009, when he won both his rubbers in a 3-2 win kept the Swiss in the world group.
Last year, he faced some rare criticism in his homeland when he pulled out of a tie in Kazakhstan at the last minute, shortly after the U.S. Open.
Without him, Switzerland were crushed 5-0 and lost their place in the world group.
Machado was quick off the mark as he broke Federer's serve in the opening game although the world number three quickly returned the compliment in the fourth.
Quick around the court and strong on his forehand, the 27-year-old Portuguese, who has never won an ATP title, refused to be overawed and continued to cause Federer problems.
He broke again in the eleventh with a pinpoint crosscourt forehand after Federer had saved two previous break points and wrapped up the set in the next game as the Swiss over-hit a forehand.
Machado, however, lost his way in the fourth game of the second set when two unforced errors helped Federer break serve before going on to level the match.
Finally finding something like his best form, Federer began the third set with another break, although he had to save three break points in the fourth game and two more in the final game as he went 2-1 ahead.
The Swiss broke again in the third game of the fourth set after the Portuguese, by now losing his nerve, had missed a flurry of chances in the previous game.