ODENSE, Denmark (AP) Rafael Nadal and Fernando Verdasco had to work harder than expected to give Spain the winning point in Saturday's doubles match to secure an unassailable 3-0 lead over Denmark in the Davis Cup's second-tier relegation playoff.

The Spanish pair overcame unheralded Danish duo Frederik Nielsen and Thomas Kromann 6-4, 3-6, 7-6 (4), 6-4.

Nadal had helped build a 2-0 lead by winning his singles match on Friday, his first appearance for Spain in two years. The five-time winners had lost three straight matches without him to slip into the second tier of the competition.

This win means Spain stays in Group 1 for the Europe-Africa Zone, while Denmark will play Sweden in a second relegation round.

''It was important for us to win this tie after losing some in a row,'' said Nadal. ''It gives us the chance to fight next year to go back to the world group.''

This was Nadal's first competition since his stunning loss after leading by two sets to Fabio Fogini in the third round of the U.S. Open earlier this month. That meant the 14-time Grand Slam winner, who has been struggling since a return from several injuries, will finish the season without a major title for the first time since 2004.

Nadal wasn't originally scheduled to play the doubles match, but captain Conchita Martinez decided to make a switch and put her best player in for Roberto Bautista Agut.

Still, Nadal and Verdasco were given a match by Nielsen, who has a singles ranking of 283rd, and the unranked Kromann.

The Spaniards weren't able to take control of the match until Nielsen hit costly back-to-back double faults to cede set point in the third-set tiebreaker.

They then broke Denmark twice in the fourth set before Verdasco held serve to secure the win.