Novak Djokovic won in the singles and doubles to help Serbia fight past Kazakhstan 2-1 and reach the Davis Cup semi-finals in Austria.
World number one Djokovic beat Alexander Bublik 6-3 6-4 to level the tie following compatriot Miomir Kecmanovic's loss to Mikhail Kukushkin.
Djokovic then partnered Nikola Cacic to beat Andrey Golubev and Aleksandr Nedovyesov 6-2 2-6 6-3.
They will face Croatia in the semi-finals in Madrid on Friday.
Either the Russian Tennis Federation or Sweden, who play on Thursday, will face Germany in the other semi-final.
It is the fifth time Serbia have reached the Davis Cup last four.
"I'm proud of the fighting spirit. We dropped off in the second set but we bounced back and held our nerves," Djokovic said following the doubles victory.
"I am proud of Nikola and proud of this team."
Djokovic needed to win after Kazakhstan's Kukushkin produced a stunning 7-6 (7-5) 4-6 (7-6) (13-11) victory over Kecmanovic in a three-hour battle.
Veteran Kukushkin led by a set and 4-2 before Kecmanovic, making his Davis Cup debut, reeled off four straight games to force a decider.
The Serb served for the match at 5-3 in the third but missed two match points and had to take a medical timeout after Kukushkin found the crucial break.
Kecamonic led the tie-break 4-1 and garnered a further two match points but could not find a way over the line, with Kukushkin eventually converting his own fifth match point.
Djokovic, who offered animated support to Kecmanovic during the first rubber, has not lost a Davis Cup singles match since 2011 and was barely troubled by Bublik.
He won 91% of points behind his first serve as he swept past the world number 36, before returning to the court 30 minutes later to help seal Serbia's semi-final spot.