PARIS — Briefly, and only briefly, Rafael Nadal was in a difficult spot in the French Open quarterfinals.

For the first time in this year’s tournament, the eight-time champion dropped a set Wednesday.

And this had to be on Nadal’s mind: His opponent, Spanish compatriot David Ferrer, could present real problems. Not only is Ferrer ranked No. 5, and not only was he the runner-up at Roland Garros a year ago but he also beat Nadal on clay the last time they played.

So how did Nadal handle this test? Perfectly. From late in the second set, he won 10 games in a row, and 13 of 14 the rest of the way, to come back and beat Ferrer 4-6, 6-4, 6-0, 6-1, setting up a semifinal Friday against Wimbledon champion Andy Murray of Britain.

Save 75% on a Digital Subscription Today

It was Nadal’s 33rd consecutive win at the French Open and improved his record in the event to 64-1.

Murray beat No. 23 Gael Monfils of France 6-4, 6-1, 4-6, 1-6, 6-0. In front of a crowd loudly pulling for Monfils, Murray was terrific at the outset, mediocre in the middle, then closed on a high.

The other men’s semifinal will be No. 2 Novak Djokovic of Serbia against No. 18 Ernests Gulbis of Latvia.

Earlier, No. 4 Simona Halep of Romania and No. 28 Andrea Petkovic of Germany both moved into the semifinals of a Grand Slam tournament for the first time. The other women’s semifinal will be 2012 champion Maria Sharapova of Russia against No. 18 Eugenie Bouchard of Canada.

Halep beat 2009 champion Svetlana Kuznetsova of Russia 6-2, 6-2, and Petkovic defeated 2012 runner-up Sara Errani of Italy 6-2, 6-2.