MELBOURNE, Australia — Before their semifinal began, Simona Halep and Angelique Kerber knew each other’s strengths too well. They would make each other run, stretch and hit ball after ball to finish a point and then do it again and again.

But these two great counterpunchers have never pushed each other like they did on this late Thursday afternoon with the shadows and the rallies lengthening.

After one rally ended, late in the final set, they were both leaning on their rackets for support, chests heaving as they tried to recover in time for the next grueling exchange.

“I couldn’t think anymore,” Halep said.

Match points began to seem irrelevant: Kerber saved two in the 10th game; Halep saved two in the 12th and on they went until Halep finally closed out one of the best Australian Open semifinals, 6-3, 4-6, 9-7, on her fourth match point.

“In that final set they had six or seven of the greatest rallies I can remember,” said Pam Shriver, the ESPN analyst and former U.S. Open finalist, still shaking her head and searching for superlatives a few minutes after the duel had ended.

Halep’s next duel in Saturday’s Australian Open final will be with Caroline Wozniacki, who defeated Elise Mertens, 6-3, 7-6(2), in the day’s first and less dramatic semifinal.

Neither the top-seeded Halep nor the second-seeded Wozniacki has won a Grand Slam singles title, but whoever wins their final will become No. 1 on Monday.

Wozniacki kept muttering “Come On” to herself on this muggy afternoon. She is normally an upbeat personality, once nicknamed “Sunshine,” but she had been troubled for the last seven years over her last journey to the Australian Open semifinals.

In 2011, when she was just 20 years old, Wozniacki held a match point against the Chinese star Li Na when serving at 5-4 in the second set. Wozniacki went on to lose the match.

“That’s still haunting me to this day,” she said before taking the court for another semifinal in Melbourne, against Elise Mertens, an unseeded but fast-rising Belgian player counseled by the former world No. 1 Kim Clijsters.

This latest trip to the final four was not without struggles, but the second-seeded Wozniacki fought through the nerves and prevailed, 6-3, 7-6 (2), to reach her first Australian Open final.

She managed the victory despite again faltering when serving for the match at 5-4 in the second set. She blew a 30-0 lead with a tight forehand that landed just wide, a double fault, a mediocre backhand approach shot that Mertens slapped for a forehand winner, and then, with the tension rising, another double fault.

Mertens bared her teeth and looked at her support group in the players’ box, including her coach and boyfriend, Robbe Ceyssens. She and they were well aware that such an abrupt momentum shift could have big consequences. Wozniacki knew it, too.

In 2011, after losing in three sets to Li, she observed glumly at her post-match news conference that “Sometimes in matches or in tennis it’s one ball that can change everything.”

Wozniacki, the best player Denmark has ever produced, who was No. 1 for 67 weeks in 2010 and 2011, recalled returning to the practice court in Melbourne after that defeat to Li.

“I never do that after going far in a tournament and losing after a tough battle,” she said. “I usually take a day off the next day. I went back and practiced. Just needed to get some frustration out. I went on a roll after that and won a bunch of tournaments in a row. At the same time, it was still that one match that was still hurting.”

That one match still loomed on Thursday as she tried to close it out. She had also saved two match points in her second-round match here against Jana Fett, coming back from 1-5 down in the third set.

“It means so much to me,” she said after the win on Thursday. “I got really tight at 5-4, couple double faults, and I thought after two good first serves — I thought I was all calmed down, and it was all good. And then it wasn’t good anymore.”

She said her 2011 defeat was “definitely on my mind” and that her legs, normally sturdy, suddenly began to shake. She eventually had to save two set points on her serve at 5-6 before taking command of her nerves and the match in the tiebreaker.

“I took a few deep breaths,” she said.

Now, after avoiding another semifinal nightmare in Melbourne, she will have another chance to fill another longstanding gap on her résumé by trying again to win her first Grand Slam title. Wozniacki has reached two United States Open finals: losing in 2009 to Clijsters and in 2014 to Serena Williams.

Clijsters and Williams are the kinds of power players who have long stood in the way of the biggest titles for Wozniacki, a remarkable defender and mover who has long lacked a truly decisive shot. But only one player remains her way in Melbourne, and Halep is a counterpuncher with a similar style to Wozniacki’s.

A version of this article appears in print on , on Page B11 of the New York edition with the headline: Wozniacki Takes Command of Nerves to Advance to First Australian Final. Order Reprints | Today’s Paper | Subscribe