A deciding set in the doubles rubber went all the way to a tie-break before Andrey Rublev and Karen Khachanov eventually closed it out in dramatic fashion, 6-4 4-6 7-6, taking it 10-8 against Novak Djokovic and Viktor Troicki.
Rublev stormed to an impressive 6-1 6-2 victory over Filip Krajinovic to initially give Russia the edge in the tie, before Djokovic overcame Karen Khachanov to take the tie into a deciding doubles rubber. That was just the start of the drama.
Russia took the opening set in fine fashion with Rublev on fire from the back of the court, but that preceded a series of emotional incidents in the second set which left Djokovic and Troicki livid.
Two separate line calls went against Serbia and left the pair infuriated, while Djokovic also called out the trainer due to issues with his elbow before his team pulled through to take it 6-4 and force a decider.
The crucial final set went with serve right up until the tie-break, and Russia held their nerve to close it out in dramatic fashion after fending off a Serbia match point to secure their progression.
Russia will now take on Canada in the last four of the competition on Saturday with Denis Shapovalov and team having had a day longer to rest up.
For Serbia it was a chastening defeat after Djokovic and Troicki looked to have had the deciding tie in their grasp on numerous occasions.
Russia's Andrey Rublev celebrates after winning the quarter-final doubles tennis match between Serbia and Russia at the Davis Cup Madrid Finals 2019 in Madrid