PARIS — For more than four hours, world No. 1 Andy Murray and third seed Stan Wawrinka played one of those matches where it seems entirely unfair for one of the players to have to lose.

But, alas, it’s impossible to have two semifinal winners from the same match so reason dictates someone has to go away disappointed. In this encounter, it was a fatiguing Murray who disintegrated in the fifth set, admittedly having nothing more to give.

Murray, hoping to be the first British player to win the French Open trophy since Fred Perry in 1935, will have to try again another year to pull off that quest. His two-sets-to-one lead evaporated as Wawrinka, the 2015 French Open champion, captured their 6-7 (6), 6-3, 5-7, 7-6 (3) 6-1 marathon in 4 hours, 34 minutes.

Murray started to look flat-footed as the Swiss cantered to a 5-0 lead in the final set. Murray had one last gasp in the match, breaking Wawrinka’s serve in the sixth game, but it was too little, too late. Wawrinka broke serve in the seventh game and closed down the match at 15-40 with one of his trademark one-handed screeching backhand winners.

“Obviously when you're 5-0 down and three breaks behind in the fifth set you're not that optimistic,” Murray said. “But, I tried to keep fighting. I’m proud of the tournament I had.

“Physically I didn't feel my best at the end,” Murray added. “It is more like I didn't have enough weight on my shot at the end of the match to put him under any real pressure. So a lot of the points he was dictating from the middle of the court, and I was sort of, retrieving and allowing him to pretty much hit the shots that he wants. And against a shotmaker, someone who hits the ball as big as him, that's obviously not ideal.”

The quality of the tennis for the first four sets was sublime — there was no possibility of boredom as there was no predicting what the players might produce next. There was such a constant variety of tactics and diverse shot-making, all of which kept the crowd cheering wildly, point after point.

The match played out just as some key statistics suggest. Most notable was Wawrinka’s 87 winners to 77 unforced errors, in comparison to Murray’s 36 winners to an equal 36 unforced errors.

Murray held a 10-7 career edge over Wawrinka heading into the match. But Wawrinka’s now won four of their five encounters on clay courts. The only time Murray defeated Wawrinka on clay was in last year’s French Open four-set semifinal.

Last year was Murray’s only appearance in a French Open final. He’s won three Grand Slam titles — two Wimbledon and one U.S. Open — and heads into Wimbledon as the defending champion next month.

Wawrinka will be hoping to win his second French Open title on Sunday. He’s won all three Grand Slam finals he’s contested — the 2014 Australian Open, 2015 French Open and 2016 U.S. Open. He won the last two of those trophies after turning 30.

Wawrinka will play the winner of the semifinal match between fourth seed Rafael Nadal of Spain and sixth seed Dominic Thiem of Austria.