Madrid - Great Britain rested Andy Murray and squeezed into the Davis Cup quarter-finals on Thursday after clinching an all-or-nothing doubles rubber to beat Kazakhstan.
Britain will face Germany in Madrid on Friday night in the last eight, which begins later on Thursday with Australia up against Canada. On Friday, Serbia will face Russia and Spain take on Argentina.
The British team knew defeat would ensure an early exit just as France, the tournament's top seeds, had already crashed out a few hours before at the hands of Serbia and Novak Djokovic.
It made the gamble to leave Murray out of the singles all the more bold, even if the Scot appears to be struggling for fitness after his lengthy duel with Holland's Tallon Griekspoor on Wednesday.
Instead, the three-time grand slam champion was cheering from the side as Kyle Edmund played brilliantly to see off Mikhail Kukushkin 6-3, 6-3 before Dan Evans was beaten 5-7, 6-4, 6-1 by Alexander Bublik to leave the tie in the balance.
But Jamie Murray and his partner Neal Skupski, making his Davis Cup debut, held their nerve to prevail 6-1, 6-4 over Bublik and Kukushkin, who might have felt the strain after returning to the court following their singles.
Djokovic booked Serbia's place in the quarters as he eased past Benoit Paire to send France crashing out.
Djokovic beat Paire 6-3, 6-3 after Filip Krajinovic won a close encounter 7-5, 7-6 (7/5) against Jo-Wilfried Tsonga to give Serbia a 2-0 advantage, making France's doubles victory irrelevant.
France's inferior record of sets won meant Russia and Argentina progressed as the two best runners-up.
Their failure to go through is a surprise given they were the top seeds in the competition, which they have won on 10 previous occasions and were only denied an 11th success by Croatia in last year's final.
Joining Serbia in the last eight were Germany, who secured the one rubber they needed against Chile as Philipp Kohlschreiber defeated Nicolas Jarry 6-4, 6-3 in the singles.
Serbia will play Russia on Friday at an earlier time of 11:30 (SA time) while Spain's match against Argentina and Britain's against Germany will begin at 18:30 (SA time) after organisers brought forward both sessions by half an hour.
One of the problems of this week's new format at the Caja Magica has been longer ties running on into the early hours of the morning.
Italy's last doubles match against the United States on Wednesday finished at 3.04GMT, making it the second latest finish in top-level tennis history.