Spain's Nicolas Almagro advanced to the quarterfinals of the Rogers Cup in Montreal with a 7-6 (7-5), 6-3 victory over Frenchman Richard Gasquet.

Each player had his serve broken twice in the first set of Thursday night's match before Almagro eventually seized the advantage by winning a close tiebreaker.

But the 10th-ranked Spaniard did not face a single break point in the second set, dominating his service games despite putting just 46 percent of his first serves in play that set.

With the win, Almagro advanced to a quarterfinal match against another Frenchman, Jo-Wilfried Tsonga, who upset world No. 3 Roger Federer of Switzerland in another Thursday night contest.

Almagro is the only Spaniard remaining in the Rogers Cup after three of his countrymen were eliminated on Wednesday.

In the biggest upset, world No. 2 Rafael Nadal suffered a shocking second-round defeat at the hands of 41st-ranked Croatian Ivan Dodig.

The Rogers Cup is one of nine ATP World Tour Masters 1000 events, which rank just below the four Grand Slam tournaments and the season-ending Barclays ATP World Tour Finals in terms of ranking points and prestige.

It also is a key tune-up event for the U.S. Open, which gets underway on Aug. 29.