Top-ranked Rafael Nadal rallied to defeat Sam Querrey in four sets today to give Spain a 1-0 lead over the United States in their Davis Cup semifinal.

MADRID, Spain — David Ferrer beat Andy Roddick in five sets to give Spain a 2-0 lead over the United States in their Davis Cup semifinal.

The fifth-ranked Ferrer beat No. 8 Roddick 7-6 (5), 2-6, 1-6, 6-4, 8-6.

Earlier, top-ranked Rafael Nadal gave the hosts the early advantage with a 6-7 (5), 6-4, 6-3, 6-4 win over Sam Querrey.

The best-of-five series includes doubles on Saturday when American's Mike Bryan and Mardy Fish face Fernando Verdasco and Feliciano Lopez.

Nadal overcame Querrey's booming serve and early momentum before settling in to dictate the match on his favorite clay surface, winning 6-7 (5), 6-4, 6-3, 6-4 in the opening singles at the Las Ventas bullfighting arena.

The 39th-ranked Querrey, making his Davis Cup debut as a late substitute for James Blake, came out strongly and took the first set in a tiebreaker after Nadal hit a shot into the net.

But 74 unforced errors cost Querrey as Nadal won the second set on his second break point to even the match.

"He got himself fired up and got the crowd into it," Querrey said.

The Spaniard broke Querrey two more times to close out the match.

Querrey had 17 aces and 76 winners. Nadal had 59 winners and 35 unforced errors.

"It was very difficult," Nadal said. "Never in my life have I had so many service points scored against me on a clay court. It's very important for us to start with a victory."

Spain, which hasn't lost a clay-court Davis Cup series in nine years, is looking to reach its sixth Davis Cup final. The U.S., winner of a record 32 Davis Cup titles, has assembled a makeshift squad following the withdrawals of Blake and doubles player Bob Bryan. The winner will face either Argentina or Russia in the final.

The Americans are 29-44 when dropping the first singles match.

Fernando Verdasco and Feliciano Lopez will team up in Saturday's doubles against American pair Mike Bryan and Mardy Fish, who is filling for Bob Bryan. Nadal plays Roddick and Ferrer faces Querrey in Sunday's reverse singles.

Querrey's previous record against left-handed players (3-5) and on clay (5-9) didn't bode well, especially since he was up against a player who came in with a 155-14 career record and 22 titles on the surface.

The 6-foot-6 American started well with an ace to take the opening game. Nadal, playing for the first time in Spain since winning Wimbledon and Olympic gold, finally had the home crowd cheering after smacking a winner down the line to set up the tiebreaker.

The 20-year-old Querrey took a 4-1 lead in the tiebreaker after serving a 134 mph serve down the middle. Nadal battled back to 5-4 before double-faulting, and Querrey closed out the set two points later.

"It was very difficult for me to return balls and control points," said Nadal, who improved to 9-2 on clay in the competition. "Maybe with the altitude it made it a little bit easier for him ... to score points much easier than normally on a clay court."

Querrey broke Nadal for the first, and only, time to open the second set. The Spaniard, who has lost only twice in his last 116 clay matches, broke back for 2-2.

"With a 2-0 lead, if maybe I had made another shot here or there or if he missed a shot ... I could have gone up 3-0 and made it tougher for him to come back," Querrey said. "But he doesn't go away."

Both players held serve until the 10th game, when Querrey missed two straight backhands and Nadal evened the match at 1-set apiece.

Nadal took control in the third set, breaking Querrey in the fourth game with a crosscourt forehand and celebrating with a running jump and fist pump.

In the fourth set, Querrey saved two break points in the seventh game and held for 4-3. But his serve was wilting in the afternoon sun, and a double-fault in the ninth game preceded a backhand into the net to give Nadal the decisive break.