Daniel Nestor's shot at a second Olympic tennis gold medal is over.

Nestor and Vasek Pospisil will play for bronze after losing their semifinal Thursday to Spain's Rafael Nadal and Marc Lopez 7-6 (7), 7-6 (6).

The Canadian duo will face Jack Sock and Steve Johnson of the United States in the bronze-medal match on Friday.

Story continues below advertisement

Spain will play Romania's Florin Mergea and Horia Tecau in the tournament's final.

Nestor was added to Canada's Olympic team after star Milos Raonic withdrew because of concerns over the Zika virus.

The 43-year-old from Toronto, who's making his sixth Olympic appearance, teamed up with Montreal's Sebastien Lareau to upset heavy favourites Todd Woodbridge and Mark Woodforde in the gold-medal match at the 2000 Sydney Games. It stands as Canada's only Olympic medal in tennis.

Pospisil and Nestor, seeded No. 7, lost the first-set tiebreak 7-1 to the seventh-seeded Spaniards.

Story continues below advertisement

Nestor exchanged heated words with the chair umpire in the second set, especially after the official called a shot as out when the veteran player insisted it was in, as evidenced by a mark on the court.

The second set also went to tiebreak, with the Canadians battling back to force the decisive game. A pair of double faults while Canada held serve gave the Spaniards an early advantage in the tiebreak.

A third double fault by Nestor handed Spain the tiebreak victory and a berth in the gold-medal match.

The game was played on a small side court, where it was standing room only. Fans broke holes in the green plastic surrounding the court so they could peer through the chain-link fence.

Story continues below advertisement

Nadal was playing about 90 minutes after he dispatched Gilles Simon of France to reach the men's singles quarter-finals. He was scheduled to play mixed doubles later Thursday.

Nestor has won over 1,000 doubles matches over his ATP career and has won eight Grand Slam titles with various partners.

Nestor and Dominic Inglot teamed to win the Aegon Open men's doubles final in June, giving Nestor at least one men's doubles title for 23 straight years.