(CNN) -- He's won virtually everything on offer in the world of tennis, and Roger Federer took a step closer to a complete collection as he saved Switzerland from an embarrassing defeat in the Davis Cup quarterfinals on Sunday.
Staring down the barrel against unfancied Kazakhstan following Saturday's doubles loss, the 17-time grand slam champion wasn't even sure he'd get to take the court in Geneva.
However, his 2008 Olympics gold-medal-winning partner Stanislas Wawrinka bounced back for his first victory of the weekend to level the scores at 2-2.
The Australian Open champion came from a set down to beat Mikhail Kukushkin 6-7 (4-7) 6-4 6-4 6-4 and set up a decider.
"I was hoping so much I was going to get a chance to play and not just watch Stan play," Federer said.
"I got the opportunity and I'm happy I lived up to the hype and the expectations, and I was able to get the boys through so very happy for them."
Federer's 7-6 (7-0) 6-2 6-3 victory over Andrey Golubev -- previously unbeaten in the competition this season -- gave him the record for most Davis Cup wins by a Swiss player, putting him past the 34 recorded by Jakob Hlasek.
Hlasek was part of the only Swiss team to reach the final, losing to a star-studded U.S. team in 1992.
"I knew Stan was going to play better than Friday and I thought as well that he was going to do a better job with rhythm and against the type of player Kukushkin was, he'd find a way. That's what happened. It was tough for him for a long time," Federer said.
"Then personally for me, I just felt I was playing such great tennis the last six months that I would find a way as well and I did. It's a relief but it was a great feeling."
The Swiss will next play Italy, who also came from 2-1 down to end Britain's hopes of a first semifinal appearance since the World Group concept was introduced in 1981.
Fabio Fognini handed two-time grand slam champion Andy Murray his first singles defeat in 19 Davis Cup matches, a run stretching back to 2005, winning 6-3 6-3 6-4 to delight the home crowd in Naples.
Andreas Seppi then defeated James Ward 6-4 6-3 6-4 on the red clay to give the Italians a first semifinal appearance since 1998.
France managed an even more impressive comeback, rallying from 2-0 down against Germany to set up a semifinal against two-time defending champions the Czech Republic in Nancy.
Jo-Wilfried Tsonga leveled the tie by beating Tobias Kamke 6-3 6-2 6-4, then Gael Monfils completed a memorable victory as he won 6-1 7-6 (7-0) 6-2 against Peter Gowjowczyk.
"I'm just so proud of my players, because coming from 2-0 down on the first day was not easy," said France captain Arnaud Clement, who played in the team's 2010 final defeat against Serbia.
It clinched another home tie, against a Czech side which completed a 5-0 whitewash of Japan in Tokyo.
Lukas Rosol led the way in the absence of No. 1 Tomas Berdych, winning both singles matches and his doubles rubber.