Great Britain fought hard to keep alive the defence of their Davis Cup title, but could not quite pull off a comeback against Argentina in Glasgow.
Trailing 2-0 on Friday after singles defeats for Andy Murray and Kyle Edmund, the chances of Leon Smith's team reaching a second successive final looked slim indeed.
But the Murray brothers won the doubles on Saturday and Andy defied a leg injury to defeat Guido Pella 6-3 6-2 6-3 in the opening match on Sunday.
So the tie came down to a clash between Dan Evans and Leonardo Mayer, and it was the Argentinian who prevailed 4-6 6-3 6-2 6-4.
Evans would have expected to face Juan Martin del Potro, conqueror of Murray in five hours on Friday, but the former US Open champion hinted on Saturday he was not prepared to risk his fragile body.
Andy Murray beat Guido Pella despite an injury to send Great Britain's Davis Cup semi-final against Argentina to a deciding fifth rubber.
After more than eight hours of tennis already in this tie and on the back of a gruelling summer, it was amazing the world number two even had the energy to drag himself onto the court at Glasgow's Emirates Arena.
But, with the atmosphere having stepped up yet another notch, he did a lot more than that and raced to a 6-3 6-2 6-3 victory over an outclassed Pella.
On the face of it, it was straightforward, but Murray spent much of the third set wincing and needed an off-court injury time-out.
World number 49 Pella had been impressive in defeating Kyle Edmund on day one to give the visitors a 2-0 lead but Murray ruthlessly exploited his lack of weapons.
The victory, which took two hours and 11 minutes, meant Britain's hopes of a second successive Davis Cup final rested on the shoulders of Dan Evans.
Andy Murray has crashed out of the US Open after losing a five-set quarter-final thriller to Japan's Kei Nishikori.Read the full story ›
Andy Murray is set to return to Great Britain's Davis Cup team for next weekend's semi-final against Argentina in Glasgow.
The world number two, who sat out the quarter-final in Serbia in July following his Wimbledon triumph, was named in a provisional five-man team alongside Kyle Edmund, Dan Evans, Jamie Murray and Dom Inglot.
Murray's participation could yet depend on how he fares at the US Open, where he eased through to the quarter-finals on Monday night with a thumping win over Grigor Dimitrov.
The Davis Cup tie begins at the Emirates Arena on September 16, only five days after the final in New York.
But, unlike the Serbia clash, Murray would not have to contend with a change of surface and, injury permitting, seems almost certain to play.
Andy Murray has beaten Bulgaria's Grigor Dimitrov in straight sets to reach the quarter-finals of the US Open.Read the full story ›
Andy Murray is not distracted by injury worries for Novak Djokovic ahead of the US openRead the full story ›
Andy Murray will renew an old rivalry with Lukas Rosol after drawing the Czech in the first round of the US Open.
Murray beat Rosol in a bad-tempered match at the Munich Open last year, during which the Scot told his opponent: "No-one likes you on the tour, everyone hates you."
Seeded second in New York, Murray is also placed in the same half as world number three Stan Wawrinka and could meet the Swiss in the semi-finals.
Andy Murray served up an ace to John Inverdale after the BBC presenter appeared to forget the achievements of women tennis players.Read the full story ›
Andy Murray has won Olympic gold after defeating Juan Martin Del Potro in the men's singles final.Read the full story ›
Andy and Jamie Murray have been beaten in the men's doubles at the Rio Olympics, losing to Brazil's Thomaz Bellucci and Andre Sa.
The loss came after a tense tie break that saw the brothers beaten 7-6 (8-6) 7-6 (16-14).