MELBOURNE — Second-ranked Caroline Wozniacki fended off two match points and rallied from 5-1 down to win the last six games in the third set and avoid a second-round upset at the Australian Open.
Former No. 1-ranked Wozniacki used her experience to save match points in the seventh game of the deciding set against No. 119-ranked Jana Fett, who was making her main draw debut at a major, and eventually pull off a 3-6, 6-2, 7-5 win.
‘‘That was crazy,’’ said Wozniacki, who has reached two Grand Slam finals and was a semifinalist here in 2011. ‘‘I don’t know how I got back into the match.
‘‘She’s a tricky opponent and she had nothing to lose. And then I think she realized she was up 5-1 and she let off the speed just a little bit, and I was like, this is my last chance. I have to go in and attack.’’
Wozniacki won the next nine points, and 24 of the 31 points played from when she first faced match point. She clinched a 75-minute third set on her first match point when Fett netted a backhand.
A loss for Wozniacki would have seriously opened up the bottom half of the draw following the first-round defeats of 2017 finalist Venus Williams, US Open champion Sloane Stephens, and No. 10-seeded CoCo Vandeweghe.
No. 4-seeded Elina Svitolina is the next highest-ranked player on that side, and she next plays 15-year-old qualifier Marta Kostyuk — the youngest player to win main draw matches at Melbourne Park since Martina Hingis in 1996.
Belinda Bencic had a letdown two days after upsetting Williams, losing 6-1, 6-3 to Thai qualifier Luksika Kumkhum.
Bencic, who combined with Roger Federer to win the Hopman Cup for Switzerland this month, saved three match points on her serve before netting a backhand to give No. 124th-ranked Kumkhum a spot in the third round for the first time.
‘‘I tried to reset and focus on the next match,’’ Bencic said. ‘‘I think it was also a very tough second round, for me the toughest I could get.’’
Kostyuk, who entered the season-opening major ranked No. 521, followed up her first-round win over 25th-seeded Peng Shuai with a 6-3, 7-5 victory over wild-card entry Olivia Rogowska.
As Australian Open junior champion, Kostyuk got a wild card into the qualifying draw. She won three three-set matches to reach the main draw and is already guaranteed around $143,000.
She could lose some of that after being given a code violation after the chair umpire ruled she had communicated with her mother in the crowd.
Kostyuk is managed by Ivan Ljubicic, who works with Federer, and so gets the benefit of some first-rate analysis.
‘‘Ivan is always helping me . . . after every match, he’s telling me what’s wrong,’’ she said, smiling, after she framed a wayward serve on her first match point but got it right the second time.
Kostyuk’s progress is set to become more difficult, with a meeting against fellow Ukrainian Svitolina in the next round.
Svitolina, who won a tour-leading five titles in 2017, had a 4-6, 6-2, 6-1 win over Katerina Siniakova.
Their fellow Ukrainian, Kateryna Bondarenko, beat No. 15-seeded Anastasia Pavlyuchenkova, 6-2, 6-3, in the day’s opening match on Melbourne Park’s third show court to reach the third round here for the third time.
No. 19 Magdalena Rybarikova beat Kirsten Flipkens, 6-4, 0-6, 6-2.
Jo-Wilfried Tsonga rallied from 5-2 in the fifth to overcome Denis Shapovalov, 3-6, 6-3, 1-6, 7-6 (7-4), 7-5 in a 3-hour, 37-minute match.
No. 6 Marin Cilic beat Joao Sousa, 6-1, 7-5, 6-2, and advanced along with No. 10 Pablo Carreno Busta, who was leading 6-2, 3-0 when Gilles Simon retired from their second-round match with a thigh injury.
No. 23 Gilles Muller outlasted Malek Jaziri in five sets, Kyle Edmund had a straight sets win over Denis Istomin — who beat then defending-champion Novak Djokovic in the second round here last year — and Andreas Seppi beat Yoshihito Nishioka, 6-1, 6-3, 6-4.