MELBOURNE, Australia (AP) -- Rafael Nadal fended off Denis Shapovalov in a four-hour, five-set match to reach the Australian Open semifinals for the seventh time, and said he felt almost "destroyed."

After breaking his racket on the hard court in frustration at the end of the 6-3, 6-4, 4-6, 3-6, 6-3 loss, Shapovalov said he felt like Nadal got special treatment.

There were plenty of momentum-shifting moments on a hot Tuesday at Rod Laver Arena, including Nadal needing treatment for a stomach ailment after dominating the first 2 1/2 sets and Shapovalov complaining that his rival was wasting time.

None of it changed the fact that Nadal is one step closer in his bid for a men's-record 21st Grand Slam singles title. He denied ever getting any special treatment, and added that Shapovalov was young and said he would get over it.

The 35-year-old Spaniard shares the men's record of 20 major singles titles with Roger Federer and Novak Djokovic. Neither of those two are in Melbourne: Federer continues to recover from knee surgery, and nine-time champion Djokovic was deported for failing to meet Australia's strict COVID-19 vaccination requirements.

At a tournament where he's clinched the title only once (2009) and lost seven of his previous 13 quarterfinals -- by far his worst conversion rate at any of the four major tournaments -- Nadal looked vulnerable in the third and fourth sets.

But following a seven-minute break between the last point of the fourth set and his first serve in the fifth, he recovered sufficiently to hold and then break Shapovalov's serve for a 2-0 lead in the decider.

"I respect everything that Rafa has done and I think he's an unbelievable player. But, you know, there's got to be some boundaries, some rules set," Shapovalov said. "It's just so frustrating as a player. You feel like you're not just playing against the player; you're playing against the umpires, you're playing against so much more.

"I mean, it was a big break after the fourth set for this reason, and the momentum just goes away."

Nadal held onto the break through the fifth set and when it was over, he went to the corner and nodded his head a few times. Then he went back on court and properly celebrated. Shapovalov left a shattered racket on the court.

"I was completely destroyed. Tough day. Very warm," Nadal said. "At the beginning of the match I was playing great (but) Denis is very talented, very aggressive. He was serving huge -- especially the second serve.

"I think I had my chances at beginning of the third. I didn't get it. I started to feel a little bit more tired. For me, it's amazing to be in the semifinals."

The men's semifinals are both scheduled for Friday, giving Nadal two days off.

"I'm not 21 anymore!" he said. "After this ... great to have two days off.

"I felt quite good physically in terms of movement. At least it was a great test. I really believe I'm going to be ready for the semifinals."

Nadal will play either seventh-seeded Matteo Berrettini or No. 17 Gael Monfils. Berrettin was a Wimbledon runner-up last year; Monfils is 35 and contesting his second quarterfinal in 17 trips to Australia.

Top-ranked Ash Barty moved into the Australian Open semifinals with a 6-2, 6-0 win over No. 21 Jessica Pegula.

The Wimbledon champion is aiming to become the first Australian woman to win the Australian Open since 1978.

She will next face 2017 U.S. Open runner-up Madison Keys for a place in the final. It's Barty's second trip to the semifinals at Melbourne Park -- she lost to eventual champion Sofia Kenin in 2020.

"I've grown as a person. I've grown as a player," Barty said of the difference between then and now. "I feel like I'm a more complete player."

Keys beat French Open champion Barbora Krejcikova 6-3, 6-2 to return to the semifinals for the second time following her loss 2015 loss to Serena Williams at that stage.

Keys continued her resurgent 2022 season, extending her winning streak to 10 matches, including a title run in a tuneup event and 11 overall for the year. She only won 11 matches in total in 2021, when her year-end ranking slumped to 56th.

"I did everything I could to rest this off-season and focus on starting fresh and new ... starting from zero and not focusing on last year," Keys said. "I think it's going well so far."

Krejcikova took a medical timeout while trailing 5-2 in the first set from what might have been heat stress, and appeared to be lethargic at times during the 35-minute second set.

The temperature reached 32 degrees Celsius (90 degrees Fahrenheit) under almost cloudless skies.

"It was the heat with some physical conditions that started to bother me after five games," said Krejcikova, who is still playing in the doubles draw. "I mean, from there on, you know, I just couldn't put it together.

"I have been struggling with something. Yes, it was happening and I didn't feel good. I just don't want to talk about it because I think Madison, she really deserves the win and she really deserves to get the credit."