MELBOURNE, Australia — Rafael Nadal outlasted Roger Federer 6-7 (5), 6-2, 7-6 (5), 6-4 in an Australian Open semifinal on Thursday night, the longtime rivals playing with the intensity normally displayed when meeting in a Grand Slam final.
The stars who met in eight Grand Slam finals were on the same side of the draw for the first time at a major since 2005.
Two weeks ago, Nadal injured his right knee and wasn’t sure he’d be able to start the tournament. Now, he can barely believe he’s in the final.
‘‘If you tell me that two Sundays ago, I really cannot imagine,’’ Nadal said. ‘‘For me, it’s a dream to be back in a final of the Australian Open.’’
Nadal will have the opportunity to win another championship on Sunday night when the Spanish left-hander plays the winner of the semifinal Friday between defending champion Novak Djokovic and Andy Murray.
Earlier Thursday, Maria Sharapova overcame Petra Kvitova to advance to the women’s final against Victoria Azarenka. Sharapova broke Kvitova’s serve in the last game to finish off a 6-2, 3-6, 6-4 victory and the third-seeded Azarenka beat defending champion Kim Clijsters 6-4, 1-6, 6-3 to set up a Saturday night final at Rod Laver Arena that will decide the No. 1 ranking.
Nadal, who holds a 6-2 edge in Grand Slam finals against Federer, made the key service break in the ninth game of the fourth set, making an incredible cross-court forehand winner from well behind the baseline, then watching as Federer hit a backhand wide to give Nadal a 5-4 lead.
Serving for the match, Nadal moved two points away from the win when Federer sent a backhand long. He won on his second match point when Federer floated a forehand long.
At the end, Nadal smashed a ball up high in the stadium, almost clearing the roof. He then applauded along with the crowd when Federer walked off.
The 25-year-old Spaniard won the 2009 Australian title but lost in the quarterfinals in his next two trips to Melbourne Park. Federer hasn’t added to his record 16 Grand Slam titles since he won the 2010 Australian Open.
‘‘I thought Rafa played well from start to finish,’’ Federer said. ‘‘It was a tough match physically as well. I’m disappointed, but it’s only the beginning of the season. I’m feeling all right, so it’s OK.’’
When the often enthralling play was suspended for 10 minutes late in the second set for an Australian Day fireworks display, Federer seemed to be affected most. Nadal led 5-2 at the time, and Federer lost his serve in the next game to give the Spaniard the set. In all, the Swiss dropped 11 points in a row.
‘‘It’s tough, it’s not helpful, that’s for sure,’’ Federer said of the break for the fireworks. ‘‘They told us before, so it was no surprise. But I knew it was a lot of points in a row that I lost.’’
The capacity, 15,000-strong crowd was evenly split in its support, with the names seeming to blur after the R in rival chants.
Each time somebody called out for Rafa, it was met by a response for Roger. The cheers were just as loud for Nadal’s scrambling, sometimes astonishing, passing shots as for Federer’s deft winners.
With the players on serve in the second set, Nadal went so far wide on a Federer return that he was near the side wall of the arena. Incredibly, he stretched wide and returned the ball crosscourt for a winner. That set up three break points and Nadal clinched the game to take a 4-2 lead in the second set.
Federer saved a set point in the 11th game of the third set that eventually forced a tiebreaker. But Federer made three unforced errors in the tiebreaker to give Nadal a 6-1 lead, and the Spaniard eventually clinched the set on his last opportunity of five set points.
‘‘Please win the point, that’s all,’’ Nadal recalled when asked what he was telling himself at 6-5 in the tiebreaker. ‘‘I was very, very nervous at that moment. Losing four set points in a row is tough, especially when you play the toughest in history.’’
Both players were asked if they bring out the best in each other.
‘‘I don’t know if it’s true ... it’s my assumption,’’ Federer said. ‘‘I feel he plays really good against me. He’s also got a winning record against me which maybe gives him extra confidence. I think he has a clear plan and he follows that one very well.’’
Nadal said that’s not the case.
‘‘I don’t play my best tennis because it’s Roger in front, I play my best tennis because I am ready to play my best tennis,’’ Nadal said. ‘‘It’s true I played a lot of good matches against him during my career ... but I believe that he played a few fantastic matches against me, too.’’
Clijsters was in the crowd, only hours after her title defense ended. And Ivan Lendl was at Rod Laver Arena for a second night, scouting opponents again as Murray’s coach. So were former Australian greats Laver, Ken Rosewall and Pat Rafter.
Sharapova lost to second-ranked Kvitova in the Wimbledon final last year, her first major final since returning from an injury layoff following a shoulder operation in 2008. She has won three majors, but none since the 2008 Australian Open.
‘‘In the third set, I felt she always had the advantage because I was always down on my serve,’’ said Sharapova, who served five double-faults in the third set and 10 in the match. ‘‘I just told myself ‘You just gotta go for it, don’t let her finish off the points like she likes to.’’’
Azarenka won the first semifinal after twice recovering from periods when a resurgent Clijsters seemed to have the upper hand, to secure victory in only her second appearance in a major semifinal.
‘‘I felt like my hand is about 200 kilograms and my body is about 1,000 and everything is shaking, but that feeling when you finally win is such a relief. My God, I cannot believe it’s over. I just want to cry,’’ Azarenka said as she choked back tears, then buried her face in a towel.
Clijsters is popular in Australia, where she’s widely known as ‘‘Aussie Kim’’ after dating Lleyton Hewitt years ago. She had most of the backing from the crowd on the national holiday in what is likely to be her last Australian Open.
Azarenka held her nerve despite the crowd and playing against a proven big-match player. Clijsters has won four majors and has defended a Grand Slam title — winning the U.S. Open in 2009 and ‘10. To reach the semifinals, the Belgian saved four match points despite a sprained ankle to beat French Open champion Li Na in the fourth round and beat top-ranked Caroline Wozniacki in the quarterfinals.
‘‘I guess before you all thought I was a mental case,’’ Azarenka said in a courtside interview. ‘‘I was just young and emotional. I’m really glad the way I fight, that’s the most thing I’m really proud of. I fight for every ball.’’
Wozniacki will vacate top spot in next week’s rankings after her quarterfinal loss, leaving either No. 3 Azarenka and No. 4 Sharapova a chance to move to the top.