German Tommy Haas converted his 13th match point to beat John Isner 10-8 in the fifth set at the French Open.
He went two sets up and had 12 match points in the fourth set before finally winning 7-5 7-6 (7-4) 4-6 (4) 6-7 (10-12) 10-8 in four hours 36 minutes.
Maria Sharapova was also made to work hard for a place in the last 16 before beating China's Zheng Jie 6-1 7-5.
Seventh seed Petra Kvitova is out, beaten by Jamie Hampton, but third seed Victoria Azarenka is safely through.
Match of the day
Tommy Haas (Ger)  beat John Isner (USA)  7-5, 7-6 (4), 4-6, 6-7 (10), 10-8.
Isner already had a reputation for long matches after his 11-hour-and-five-minute win over Nicolas Mahut at Wimbledon in 2010. For the second year in a row he has gone the distance at Roland Garos.
Last year he was beaten 6-7, 6-4, 6-4, 3-6, 18-16 by Paul-Henri Mathieu and there was more heartache on Court 1 as his five-set second-round match on Friday took its toll.
"I fought a good fight," said Isner. "You know, even down two sets to love, I still was fighting and it helped me. I can't ask for a better scenario there after being down two sets to love.
"In hindsight, it probably would have been better to lose in straight sets, because I feel terrible right now. But I'll recover."
Haas said: "I had a big chance to close out in four sets, but it didn't happen. We went the distance, and I was definitely hoping it wasn't going to go like in Wimbledon with him and Mahut. I was probably going to wave the white flag before that. That was not going to happen to me."
Court Philippe Chatrier
Victoria Azarenka (Blr)  beat Alize Cornet (Fra)  4-6 6-3 6-1
Azarenka needed three sets to secure her place in the fourth round as she was forced to recover from a set down against crowd favourite Cornet.
The world number three was broken six times during the match but was still able to laugh about her serve.
"I think I left it home today," she said. "If I can win with serving like this, that's pretty remarkable."
Maria Sharapova (Russia)  beat Zheng Jie (China) 6-1 7-5
Reigning champion Sharapova must have thought she was in for a short afternoon as she raced to 5-0 first-set lead in just 27 minutes before Zheng finally got on the board.
However, the second set did not go to plan as the Russian was broken twice thanks largely to her own mistakes. Six double-faults and 22 unforced errors almost proved costly.
Rafael Nadal (Spa)  beat Fabio Fognini (Ita)  7-6 (5) 6-4 6-4
Novak Djokovic (Ser)  beat Grigor Dimitrov (Bul)  6-2, 6-2, 6-3
Court Suzanne Lenglen
Kei Nishikori (Jap)  beat Benoit Paire (Fra)  6-3 6-7(3) 6-4 6-1
Nishikori became the first Japanese man to reach the last 16 of the French Open in 75 years after he beat Frenchman Paire in a match that saw Paire deducted a point.
The Frenchman was given a warning for racquet abuse and then penalised a point for coaching at set-point up. He still went on to take the second set on a tie-break before eventually going down.
Francesca Schiavone (Italy) beat Marion Bartoli (France)  6-2 6-1
Bartoli became the third French casualty of the day as she was beaten by 2010 champion Schiavone.
The Italian broke Bartoli three times to take the first set before racing to a 5-0 lead in the second.
Richard Gasquet (France)  beat Nikolay Davydenko (Russia) 6-4 6-4 6-3
Richard Gasquet became the third Frenchman to reach the fourth round with a convincing win over former semi-finalist Nikolay Davydenko.
The seventh seed broke his Russian opponent five times on his way to setting up a last-16 clash with Stanislas Wawrinka.
Jelena Jankovic (Serbia)  beat Samantha Stosur (Australia) [ 9] 3-6 6-3 6-4
Jelena Jankovic came from a set down to beat ninth seed Sam Stosur and avenge her 2010 semi-final defeat to the Australian.
The 28-year-old will now face Jamie Hampton in the last 16.
Jamie Hampton (USA) beat Petra Kvitova (Cze)  6-1 7-6 (7)
Kvitova hit 33 unforced errors as she was beaten in two sets by American Hampton, who is ranked 54 in the world.
The 23-year-old, playing in only her second French Open, had 11 break points against the 2012 semi-finalist, converting five to win in one hour and 22 minutes.
Mikhail Youzhny (Rus)  beat Janko Tipsarevic (Ser)  6-4, 6-4, 6-3
Dominic Inglot continued to fly the flag for Britain as he reached the third round of the men's doubles with Filipino partner Treat Huey.
They beat Uzbek Denis Istomin and Russian Mikhail Elgin 6-3 7-6 (7-5) and will now play home favourites Michael Llodra and Nicolas Mahut in the last 16.
The news was not so good for Colin Fleming who, along with partner Kirsten Flipkens of Belgium, was beaten 6-4 7-5 by Natalie Grandin and Filip Polasek.
Heather Watson and Jonathan Marray are also on their way home after they were beaten in the mixed doubles by the French pairing of Alize Lim and Jeremy Chardy.
The British pair lost the first set 6-4 but struck back to take the second 10-8 on a tie-break. They were eventually beaten 14-12 in a mammoth third.
Quotes of the day
"I just snapped because you could really see they didn't really care what the score was or even who was playing. They just wanted to look nice and be at the French Open. They had no respect to the players in terms of being quiet or whatever.
"There's no excuse for my reaction. I should have talked to the referee first, but the referee told him to be quiet. Then one of the guys kept provoking me, screaming, 'Come on, Youzhny' before I tossed the ball." - Number eight seed Janko Tipsarevic on his altercation with spectators in his defeat by 29th seed Mikhail Youzhny of Russia.
"She's a machine, a juggernaut. She plays the same from the first to the last point." - Alize Cornet's description of her opponent Victoria Azarenka.
"I was thinking the other day, English, everyone knows English. Even if you pretend you don't know English, you do. You can fake it and everything, but you still understand what I'm saying, even if you're like, 'Mmm, I don't.'" - American Sloane Stephens when asked how she was enjoying it in Paris.
"Every coach do the same thing. If it's the best player of the world, he doesn't get a warning. We can see at the TV every player do like this, come on (clapping and making pushing motion), and they never receive point penalty for this." - France's Benoit Paire on the penalty point he received for coaching in his defeat by Kei Nishikori.
"Sorry, I'm not good at the history." Kei Nishikori unaware that he is the first Japanese man to make the last 16 at the French Open since Fumiteru Nakano in 1938.