Swiatek saves match point to beat Osaka at French Open
World number one Swiatek trailed 5-2 in the final set but the Pole won the last five games of the match to keep her bid for a third successive Roland Garros title on track.
She is attempting to become only the fourth woman in the Open era to lift four Roland Garros titles and just the second - after Serena Williams - to complete the clay-court treble of Madrid, Rome and French Opens in the same season.
"This match was really intense, much more intense for the second round than I ever expected," said Swiatek.
"Naomi played amazing tennis and maybe she is going to be a clay-court specialist in a while!"
Osaka, appearing at only a second Grand Slam since giving birth to her daughter last July, was on the cusp of her biggest win since returning to tennis at the start of the year but instead must digest the pain of a match that she let slip from her grasp.
"I felt for most of the match that my mind was flying around. When I focused more I played better," said Swiatek.
"I just kept going forward and I hope that my game is going to get better because of that."
Entering the showdown with a 29-2 record in Paris, Swiatek unsurprisingly landed the initial blow in the first meeting on clay between the past and present world number ones, breaking Osaka to love for a 2-1 lead.
But Osaka, who won a match at a Grand Slam event for the first time since the 2022 Australian Open with her opening victory over Lucia Bronzetti, clawed back to 4-4 as Swiatek miscued a forehand following a lengthy rally.
The Japanese star had Swiatek in trouble down set point on the Pole's serve in the 10th game, but the top seed knuckled down and forced a tie-break, which she dominated to snatch the opening set after 69 minutes.
Osaka produced a stirring response and broke Swiatek to begin the second set before she powered into a 4-0 lead, dropping just one point on serve on her way to levelling up the match.
Three break points eluded Swiatek to start the deciding set and Osaka's clean hitting quickly had her opponent again on the back foot.
Osaka blasted a backhand winner to break for a 2-0 advantage before demonstrating her resolve once more to save another five break points.
Swiatek earned a stay of execution by fending off a break opportunity to stay in touch at 2-4, but she looked doomed with Osaka serving up match point three games later.
However a terrific return kept her alive and a loose backhand from Osaka handed Swiatek a break to get back to 4-5, and it was the latter who held her nerve in a memorable finale to a thrilling encounter.
After a tough hold, Swiatek broke again to move 6-5 in front before wrapping up victory after nearly three hours.