Updated

Nifty Frenchman Richard Gasquet ousted French Open runner-up David Ferrer to secure a berth in the semifinals at the U.S. Open.

The eighth-seeded Gasquet held off the fourth-seeded Ferrer 6-3, 6-1, 4-6, 2-6, 6-3 at Ashe Stadium to become the first Frenchman to reach a U.S. Open semi in 20 years.

His semifinal opponent on Saturday will hail from Spain, either second- seeded former world No.1 Rafael Nadal or 19th-seeded Tommy Robredo. Nadal and Robredo will square off under the lights on Wednesday night at the USTA Billie Jean King National Tennis Center.

The 27-year-old Gasquet will appear in only his second career Grand Slam semifinal and his first since landing in the final four at Wimbledon six years ago.

After Gasquet shockingly swept the first two sets from Ferrer on Day 10, the gritty Spaniard fought back to take the next two stanzas and force a deciding fifth.

In the final set, Gasquet held for a 3-2 edge and then got the biggest break of the match for a 4-2 lead. He promptly consolidated the break with a hold and held on from there.

Gasquet converted on his first match point with a forehand winner after 3 hours, 23 minutes of compelling tennis on a sunny Wednesday in New York City. The Frenchman wound up with six service breaks, compared to four for his Spanish counterpart.

The 6-foot-1 Gasquet, a two-time champion on the ATP World Tour this year, also captured his fourth-round match in five sets, topping Canadian slugger Milos Raonic.

Gasquet is now 2-8 lifetime against Ferrer, including 1-2 at the majors. Ferrer beat Gasquet in the round of 16 in New York a year ago.

The 31-year-old Ferrer was a semifinalist at last year's U.S. Open and lost to the great Nadal in an all-Spanish French Open final in June. He's reached at least the quarters at the last eight Grand Slam events.

Two other quarterfinals will be staged on Thursday, when top-seeded Novak Djokovic takes on 21st-seeded Mikhail Youzhny and third-seeded Andy Murray tangles with ninth seed Stan Wawrinka.

Djokovic captured the U.S. Open in 2011 and was the runner-up in 2007, 2010 and last year when he gave way to Murray in the final. Murray is the reigning champ in New York, was a runner-up here in 2008, and is also the reigning Wimbledon titlist, having beaten Djokovic in July's finale at the All England Club. Djokovic beat Murray in this year's Australian Open final. Youzhny is a two-time U.S. Open semifinalist.