MELBOURNE, Australia (AP) — He lost the first two sets, was low on confidence and was one point from a quarterfinal exit at the Australian Open, so Daniil Medvedev asked himself the question: What would Novak do?

Fair question. Top-ranked Novak Djokovic is a nine-time Australian Open champion who finished one win short of a calendar-year Grand Slam in 2021.

Modelling himself after the 20-time Grand Slam champion, Medvedev told himself late Wednesday to make Felix Auger-Aliassime fight for every point.

More than one hour after saving a match point on his serve in the fourth set, the U.S. Open champion finished off a 6-7 (4), 3-6, 7-6 (2), 7-5, 6-4 comeback victory almost a half-hour after midnight.

“He was playing insane, like better than I have ever seen him play. It was unreal,” Medvedev said. “So third set I had zero confidence in myself and in the outcome of the match."

Medvedev mentioned his thoughts about Djokovic during his on-court TV interview and in a later news conference. He wasn't joking.

“I was not playing my best, and Felix ... was all over me,” Medvedev said. “I didn’t know what to do so I (asked) myself, ‘What would Novak do?’

“And I just thought, OK, I’m going to make him work. If he wants to win it, he has to ... fight to the last point.”

Medvedev will have to recover quickly to play Friday against French Open runner-up Stefanos Tsitsipas in a rematch of last year’s semifinals at Melbourne Park. Medvedev won at the same stage last year but lost in the final to Djokovic, who wasn't allowed to defend the title this month because he failed to meet Australia's strict COVID-19 vaccination rules.

Tsitsipas had a much easier path to the semifinals, beating No. 11 Jannik Sinner 6-3, 6-4, 6-2 earlier on Day 10.

Both men's quarterfinals had delays mid-match because of rain.

Medvedev got a six-minute break at 2-1 in the third-set tiebreaker for the roof on Rod Laver Arena to be closed, and it swung the momentum mostly his way.

Auger-Aliassime won only one of the last six points in the tiebreaker after dominating for the first two sets. He missed a match point on Medvedev’s serve in the 10th game of the fourth set.

Medvedev saved it with a big first serve out wide and then held with an overhead winner.

He broke Auger-Aliassime’s serve in the next game game and held to level the match at two-sets all. He then got another service break when the 21-year-old Canadian double-faulted in the third game of the deciding set.

It still wasn’t over yet.

Serving for the match, Medvedev had to save two break points — he saved six of six in the set and nine of 11 overall — before closing it out.

After the 4-hour, 42-minute quarterfinal match, Medvedev is now two wins from becoming the first man in the Open era to win his second Grand Slam title in the next major tournament after his first.

It's a statistic he said he wasn't previously aware of, but would now serve as extra motivation to win the title.

“If it’s true, then it will be history,” he said. “It’s perfect.”

Auger-Aliassime had lost all three previous matches against the second-ranked Medvedev, including a straight-set loss in the U.S. Open semifinals last September.

But he was the aggressor in the first two sets, keeping Medvedev off balance with his forehand, up-tempo game and athleticism. He hit 64 winners and made 75 unforced errors as he attacked at every opportunity. It forced Medvedev into uncharacteristic double-faults in the first set and made him play more inside the baseline to claw his way back in the third and fourth sets.

“I wish I could go back and change it, but I can’t,” Auger-Aliassime said of the result. “I have accepted it already. I’m going to leave Australia with my head held high, and I’m going to go into the rest of the season knowing I can play well against the best players in the world.”

Medvedev finished with 49 winners and 53 unforced errors. He served 15 aces but also had nine double-faults. He has been effectively the No. 1 seed since Djokovic was deported on the eve of the tournament following an 11-day visa saga.

Another who could benefit from Djokovic's absence is Rafael Nadal.

The 35-year-old Spaniard, seeking a men’s record 21st major title to break a tie with Djokovic and Roger Federer, will play Wimbledon runner-up Matteo Berrettini in the other semifinal match.

The temperature dropped for the men's quarterfinals from the highs of the afternoon, when Danielle Collins beat Alize Cornet 7-5, 6-1 and 2020 French Open champion Iga Swiatek defeated 36-year-old Kaia Kanepi 4-6, 7-6 (2), 6-3.

Collins’ win means there are two Americans in the semifinals. Madison Keys, the 2017 U.S. Open runner-up, will play Wimbledon champion Ash Barty.

The women's semifinals are scheduled for Thursday.

After the first three women's quarterfinals were decided in straight sets — top-ranked Barty beat Jessica Pegula and Keys eliminated Barbora Krejcikova on Tuesday — the last one went all the way.

“This match was crazy,” Swiatek said of her up-and-down win.

The temperature reached 36 degrees Celsius (97 degrees Fahrenheit) in that match, continuing a week of hot weather.

As she left the court, Swiatek wrote on the TV camera lens: “Thank you for the support. # Tired.”

___

More AP tennis: https://apnews.com/hub/tennis and https://twitter.com/AP_Sports