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

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.

Eighth-ranked Andy Roddick faced No. 5 David Ferrer in the second match Friday.

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. 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.

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. 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.