Argentina saw off a thrilling comeback from defending champions Great Britain to win their semi-final 3-2 and clinch a place in the Davis Cup final.

Britain had trailed 2-0 after the first day in Glasgow, but doubles victory on Saturday was followed by a singles win for Andy Murray on Sunday.

Dan Evans won the first set of the deciding match but Leonardo Mayer fought back to win 4-6 6-3 6-2 6-4.

Argentina will travel to Croatia for the final in November.

It is the fifth time Argentina have reached the final as they attempt to win the title for the first time.

Britain, who won the Davis Cup for the first time in 79 years 10 months ago, must wait for Wednesday's draw to see which nation they will face in the 2017 first round in February.

"It never feels good losing, of course it doesn't, but no regrets," GB captain Leon Smith told BBC Radio 5 live.

"We just asked the guys to go out and fight their hardest - the Argentines over the course of the weekend just played that little bit better and got the wins that were needed."

Argentina are through to their fifth Davis Cup final

Superb Mayer clinches win for Argentina

There was intrigue well before the first ball was struck on Sunday, with rumours circulating that Juan Martin del Potro would not play in a potential deciding fifth match as he nurses his body back from serious injury.

After Murray beat Guido Pella 6-3 6-2 6-3 to level the tie at 2-2, it was confirmed that Argentina's star man would sit out the final rubber and be replaced by world number 114 Mayer.

"We had to keep it to ourselves until the last moment so Great Britain were thinking a little bit, but we knew from last night that Mayer would play," said Argentina captain Daniel Orsanic.

Evans made a good start but could do nothing to stop Mayer

Evans, the world number 56, had been expected to come in for Kyle Edmund, who was named in the original line-up on Friday, and fresh from a superb run at the US Open he had every reason to be optimistic.

That feeling only grew among the 8,000 home fans as Evans won the first set impressively, but Mayer then simply took over with some magnificent serving.

His lowly ranking was misleading, a shoulder injury having caused him to plummet from inside the top 40 six months ago, but his form had clearly returned as he made 20 of 24 first serves to level at one set all.

The 29-year-old then backed it up with some huge returning to win the third set, by which point it was the 400 travelling Argentine fans making most of the noise in the Emirates Arena.

Evans held on in a 12-minute opening service game to the fourth set, but Mayer broke for a 3-2 lead and coolly served out to love for his ninth consecutive Davis Cup singles victory.

"I am very emotional," said Mayer. "I haven't been able to play because of injury so I am delighted to be back on form.

"I do not know what it is about the Davis Cup it brings out the best in me."

My body needs some rest - Murray

Murray, 29, suffered an injury scare in the third set of his win over Pella and was off court for eight minutes as he received treatment on his thigh, but the Scot returned to clinch victory.

He did not face a break point over the course of two hours and 11 minutes but was stretched more than the straightforward score might suggest, with Pella testing the Wimbledon champion's energy levels.

It appeared that the tactic might bear fruit after Murray missed an early break point in the third set, and then pulled up with obvious pain in his leg.

Trainer Shane Annun took his man off court and, while walking gingerly between points, Murray was more focused than ever on the resumption, winning five of the last six games.

"I have a lot of sharp pain in my right quad," he said. "I have to go and see what's up and get some treatment. I need a break. I have played so much tennis, my body needs some rest."

Analysis

Russell Fuller, BBC tennis correspondent: "Britain's hopes of winning back-to-back titles for the first time since the 1930s were ended by the better team. Three different players won singles points for Argentina, with only the Murray brothers contributing for Britain, and that ultimately was the difference.

"Del Potro's fatigue meant Mayer was the strongest option for the final rubber, and captain Orsanic deployed his resources very shrewdly throughout the weekend."