PARIS -- What started out as a stroll became quite a struggle for Serena Williams.

After going up by a set and two breaks in the French Open final, she double-faulted away that lead. Then, suddenly, she trailed in the third set.

As the tension thickened, Williams was warned by the chair umpire for an audible obscenity. She even felt the need to hit one shot left-handed.

Ah, but when Williams plays her best, no one is better. Putting aside a lingering illness, a mid-match lull and a feisty opponent, Williams staved off Lucie Safarova's upset bid to prevail 6-3, 6-7 (2), 6-2 and win the French Open for the 20th Grand Slam title of her career.

"When I was a little girl, in California, my father and my mother wanted me to play tennis. And now I'm here, with 20 Grand Slam titles," Williams said in French. "This is very special for me. I haven't always played very well here, but I'm really happy to win the 20th here."

She now has three French Open trophies to go alongside six each from the U.S. Open and Australian Open, and five from Wimbledon. She also became the first woman to win consecutive U.S. Open, Australian Open, and French Open titles since Monica Seles in 1991-92.

"This is by far the most dramatic [major title I've won]," Williams told NBC's Mary Carillo afterward. "I didn't even train yesterday, I've had the flu ... it's just been a nightmare."

Williams led 4-1 in the second set, then began to falter. Coughing between points, she double-faulted twice in a row to get broken for the first time, then double-faulted again to make it 4-all. When Safarova, now more confident in her strokes, held moments later, she led 5-4.

"I choked, simple as that," Williams said. "I hit a lot of double-faults, and my first serve just went off. ... I got really nervous, it was a big moment to win 20."

With the score 5-5, Williams broke Safarova and served for the match. But the 13th-seeded Czech player broke straight back to force a tiebreaker, which Safarova dominated with powerful groundstrokes.

Safarova her momentum going and led 2-0 in the final set before Williams began her comeback. Williams received an obscenity warning from the chair umpire after holding serve for a 3-2 lead in the third set. After sealing the game with an ace, Williams yelled on center court and received the warning moments later.

The top-ranked Williams took the last six games and added to her championships on the red clay of Roland Garros in 2002 and 2013.

She stretched her Grand Slam winning streak to 21 matches, following titles at the U.S. Open last September and Australian Open in January.

Only two women in the century-plus history of Grand Slam tennis have won more than the 33-year-old American: Margaret Smith Court with 24 titles, and Steffi Graf with 22.

Serena Williams won the French Open in dramatic fashion, prevailing in three back-and-forth sets over Lucie Safarova. Dominique Faget/AFP/Getty Images

This one, though, did not come easily for Williams, who double-faulted 11 times, part of 42 total unforced errors, 25 more than her opponent.

Whatever it takes to win, right? No one does that better than Williams, who is 32-1 in 2015, including 12-0 in three-setters.

She is the first woman since Jennifer Capriati in 2001 to win the Australian Open and French Open back-to-back and will head to the grass courts of Wimbledon this month with a chance to extend a bid to do just about the only thing she hasn't accomplished: win a calendar-year Grand Slam.

When Saturday's match, which went from a stroll to a struggle, was over, Williams dropped her racket, threw her head back and lifted her arms into a "V." In the stands, her coach, Patrick Mouratoglou, stood and raised his hands. He held aloft two fingers on his right and made a fist with his left, to symbolize "20."

And to think: Four times in her first six matches over the past two weeks, Williams dropped the opening set before coming back to win, including in Thursday's semifinals, when Williams was lethargic and, Mouratoglou would say afterward, bothered by the flu, a fever and difficulty breathing.

So the most meaningful question leading into the final against Safarova, a 28-year-old lefty with a whip-like forehand who was making her Slam final debut in her 40th major appearance, was this: How healthy would Williams be?

She began providing answers from the get-go on a sunny afternoon.

Williams closed the first game with an untouchable groundstroke winner, followed by a 120 mph ace. As if to prove her timing on returns was just fine, too, she pounded a 104 mph serve with a cross-court forehand so powerful and precise that Safarova didn't bother to step toward the ball, watching the winner sail by for a break that made it 3-1 after 13 minutes.

Williams received a kiss from 18-time Grand Slam champion Martina Navratilova as she collected the French Open trophy, raising it triumphantly over her head as she milked the applause from the Court Chatrier crowd.

Williams, speaking in French, paid tribute to beaten finalist Safarova.

"Lucie played very well, she was a magnificent opponent," Williams said. "It was a dream for me to win."

Safarova returned the compliment -- in English:

"Serena, you were amazing today, you a great fighter. Congratulations," she said.

The Associated Press contributed to this report.