MELBOURNE, Australia (AP) -- Andy Murray has finally beaten Roger Federer at a Grand Slam.
The U.S. Open champion stayed in the hunt for a second consecutive major title with a 6-4, 6-7 (5), 6-3, 6-7 (2), 6-2 win over the 17-time Grand Slam champion at the Australian Open on Friday.
Murray will play defending champion and top-seeded Novak Djokovic, who was rarely troubled while beating David Ferrer in straight sets in just under 90 minutes on Thursday night -- about 2½ hours less than Friday's semifinal.
Advantage to Djokovic, then, for the Sunday night final.
While U.S. Open champion Murray came into the match with a 10-9 career advantage, Murray had never beaten Federer in the three times they had met in majors -- at finals at the 2008 U.S. Open, 2010 Australian Open and last year at Wimbledon.
"It's always tough against him when he plays his best tennis," Murray said, explaining why he was unable to close out the victory while serving for the match at 6-5 in the fourth set. "I was obviously very nervous. He plays his best tennis when his back is against the wall."
Federer outplayed Murray at stages of the match, but the 25-year-old Scot appeared to have the legs and stamina to give him the advantage over the 31-year-old Federer in the fifth set, including a service break to clinch the tense match.
With a capacity crowd of 15,000 at Rod Laver Arena watching, including the Australian legend Laver himself, Federer opened the match serving and was in trouble early, losing a 28-rally point to set up break point for Murray. But Federer held the game with a stunning cross-court forehand that just looped over the net from the baseline.
Murray, who had not lost a set through five rounds at Melbourne Park this year, had the first service break -- on his fourth break point -- to lead 2-1. It came in unusually cool summer conditions in Melbourne -- breezy and temperatures of only 60 degrees during most of the match.
There were no service breaks or even break-point chances in the second set, resulting in the tiebreaker that Federer dominated early to take a 4-1 lead. But Murray fought back to level at 5-5 before Federer secured a set point with a cross-court return of Murray's smash attempt. The Swiss star clinched the tiebreaker and the 58-minute second set when Murray hit a forehand long on the next point.
The crowd was initially evenly split between Federer and Murray supporters -- and at times, they were competing to be heard. At one point in the second set, a group of Murray fans wearing white shirts with blue letters spelling his nickname "Muzza" stood to chant Murray's name, while a group of Federer supporters with Swiss flags on their cheeks and shirts chanted Federer's name.
Murray broke Federer's service in the sixth game of the third set, clinched when Federer's attempted backhand in the left corner went long, then consolidated the break with a strong service game that included his 14th ace of the match to go up 5-2.
Federer, hampered by a 56 percent first-serve percentage through the first seven games of the set, managed to hold his service in the next. But Murray took a 2-1 set lead in the next game, clinching the game and the set with an ace.
With the crowd chanting "Let's go Roger, let's go," Federer grabbed back the momentum by breaking Murray for the first time in the match, then held his next service game before Murray won the next three games.
There was some controversy in that leveling game when Murray thought he had game point on a shot to the base line, but it was over-ruled by a linesman. He eventually held to level the set at 4-4, then 5-5 before the late exchange of service breaks that sent the set to another tiebreaker won by Federer, sending the match to a fifth set.
Earlier Friday, top-seeded Sara Errani and Roberta Vinci of Italy won the first title of 2013 at Melbourne Park, beating the unseeded Australian pair of Ashleigh Barty and Casey Dellacqua 6-2, 3-6, 6-2 for the women's doubles championship.
The 16-year-old Barty was attempting to become the youngest Grand Slam champion since Martina Hingis won the Australian Open singles title in 1997.
On Saturday, defending champion Victoria Azarenka plays sixth-seeded Li Na of China for the women's singles title. Li lost the Australian Open final to Kim Clijsters in 2011 two months before winning her first and only Grand Slam at the French Open.
"Last time was more exciting, (more) nervous because it was my first time to be in a final," Li said Friday. "But I think this time (I'm) more calmed down, more cool."
Azarenka leads 5-4 in career matches, including the last four times they've played.
"I'm really hungry to defend my title," said Azarenka, who needs to beat Li to retain her No. 1 ranking. "I've put myself in the position to give it the best shot."
Also on Saturday, American brothers Bob and Mike Bryan will play their fifth consecutive Australian Open doubles final and attempt to win their record 13th Grand Slam doubles championship. They'll play the Dutch pair of Robin Haase and Igor Sijsling.