Prague, Czech Republic, 19 November 2012 | AFP

The Czech Republic won the Davis Cup after Radek Stepanek stunned Spain’s Nicolas Almagro in the decisive rubber of the 100th final of the men’s teams tennis competition on Sunday.

Stepanek, the world No.37, beat 11th-ranked Almagro 6-4 7-6(0) 3-6 6-3 in three hours and 52 minutes in a clash of the teams’ No.2 players on the hardcourt of Prague’s O2 Arena.

The Czech Republic claimed their first Davis Cup since gaining independence following a 1993 split from Slovakia. Former Czechoslovakia won the event in 1980.

“It’s amazing, we’ve written history here in our country,” a jubilant Stepanek said.

The victory has also handed the Czechs a rare team double after their women lifted the Fed Cup at the same venue two weeks ago — a feat last achieved by the United States in 1990.

The Czechs also won the Hopman Cup in January – represented by Tomas Berdych and Petra Kvitova – to claim all three of the International Tennis Federation’s team events in one year, the first time in history such a feat has been achieved.

In Sunday’s key rubber, a wild home crowd of more than 14,000 fans was all that Stepanek needed to shake off the fatigue from Friday’s singles and Saturday’s doubles.

His game against a rested Almagro went with serves until Stepanek capitalised on a single set point to break the Spaniard for a 6-4 win in the first set.

“I came on the court with a mindset that I have to stay calm, hungry, motivated, concentrated, and always know what I’m doing. And that’s what I did,” Stepanek said.

The crowd got even louder as Stepanek, combining patience with aggressiveness, topped up with put-away volleys, came back from 4-2 down in the second set.

He failed to convert four set points but then thrashed Almagro 7-0 in the tiebreak.

Almagro fought back and held on to his serve to take the third set.

But Stepanek, red hot and propelled by the crowd, refused to bow and took the fourth and final set after breaking Almagro’s serve once again.

In the first game on Sunday, Spain’s David Ferrer beat Berdych in straight sets.

Ferrer, the world No.5, needed two hours and 25 minutes to see off sixth-ranked Berdych 6-2 6-3 7-5.

“It’s very difficult to beat Tomas in three sets but I played one of the best matches of my career in Davis Cup,” said Ferrer.

Berdych said he was upset he had failed to decide the tie.

“In Davis Cup this year, I have lost only one rubber and it was the last one,” he said.

“Ferrer played an excellent game and I was always way behind him,” Berdych added.

On Friday, Ferrer beat Stepanek 6-3 6-4 6-4 and Berdych then put the Czechs level after beating Almagro 6-3 3-6 6-3 6-7(5) 6-3.

In Saturday’s doubles rubber, Berdych and Stepanek beat Marcel Granollers and Marc Lopez 3-6 7-5 7-5 6-3 for their 12th victory in Davis Cup doubles against a single loss.

The Spanish, who won the Davis Cup three times in the past five years, were missing world No.4 Rafael Nadal, who is recovering from a knee injury.