Argentina have won the Davis Cup for the first time after Juan Martín del Potro, playing with a broken finger in his left hand, inspired a stirring comeback against the hosts, Croatia, in the final.

Heading into the final day in Zagreb 2-1 ahead, Croatia were on the verge of victory when Marin Cilic surged into a two-set lead against Del Potro but the 2009 US Open champion battled back to level the match at 2-2 with a 6-7, 2-6, 7-5, 6-4, 6-3 win. That set the stage for a deciding rubber and Federico Delbonis swept past Ivo Karlovic 6-3, 6-4, 6-2 to seal victory for Argentina, who had lost their four previous finals. It is the seventh time in Davis Cup history that a country has come from 2-1 down in the final to become champions. Out of the game for nearly two years and forced to undergo three wrist operations Del Potro’s comeback has been the feelgood story for tennis in 2016.

Having won a silver medal for Argentina at the Rio Olympics, his upset five-set victory over Britain’s Andy Murray went a long way to sending his country into the Davis Cup final, where he won both singles rubbers, having overcome Karlovic 6-4, 6-7, 6-3 7-5 on Friday.

He revealed his broken finger after his singles victory. “It happened when I tried to catch a ball in the fifth set,” the right-handed Del Potro said. “This was an emotionally exhausting match and one of the biggest wins of my career. Thanks to all those who prevented me from retiring, I was very close to never playing again and, well, here I am.”

Cilic had earlier beaten Delbonis 6-3 ,7-5, 3-6, 1-6 ,6-2. Victory in Saturday’s doubles had put Croatia within one victory of a second title, having landed their first honour in 2005.

The Argentine fans, including Diego Maradona in the VIP box, treated their team to a standing ovation at the end of the tie. The Argentina coach, Daniel Orsanic, who has Croatian roots, singled out Del Potro’s heroics.

“What Del Potro did was amazing. He represents his country with so much pride and he also showed how good a player he is,” he said. “His achievement today borders on the impossible while Federico played a perfect match and was on top of every ball throughout the contest.”