MELBOURNE, Australia (AP) _ Andre Agassi overcame a record number of aces from Joachim Johannson on Sunday and set up an Australian Open quarterfinal against defending champion and top-ranked Roger Federer.

Agassi, an eight-time Grand Slam winner and four-time champion in Melbourne, produced one of his great performances to defeat the 6-foot-6 Johansson, who slammed 51 aces in their match.

One of the best service returners in tennis, the 34-year-old Agassi endured Johansson's barrage, breaking the Swede three times to win 6-7 (4), 7-6 (5), 7-6 (3), 6-4.

Agassi dropped his own serve twice, at the start of the first and fourth sets, and made only 13 unforced errors in the match _ none in the first set.

``It was a tough day,'' said Agassi. The 11th-seeded Johansson was pushing the limits on almost every shot. He mixed 66 unforced errors with a remarkable 96 winners, including his aces and service winners. In the first tiebreaker, he clinched the opening set with a second service ace at 217 kph (135 mph).

The 22-year-old Johansson surpassed Richard Krajicek's mark of 49 aces in a quarterfinal loss to Russia's Yevgeny Kafelnikov at the 1999 U.S. Open.

His final three aces came in his last service game.

``Joachim today was hitting the ball so big,'' Agassi said. ``What can you do but sort of react?

``I was anxious the whole time,'' he added. ``I had to stay focused and disciplined, give myself a look and hope I can convert on the few chances I do get.''

Johansson didn't know of the record until after the match. He said he might be able to improve on it in future.

Federer, whose 11 titles in 2004 included three majors, extended his winning streak to 25 matches with a 6-2, 6-2, 7-6 (4) defeat of Marcos Baghdatis.

Marat Safin, who lost to Federer in last year's final here, converted just one of his 18 breakpoint chances in a fiery 4-6, 7-6 (1), 7-6 (5), 7-6 (2) win over Olivier Rochus that lasted 3 hours and 42 minutes.

Safin was given a code violation for spiking his racket into the court, twice for good measure, after wasting three opportunities to get back on serve in the fifth game of the third set.

After receiving the code violation from umpire Andreas Egli, he belted the broken racket three times on a drink cooler at the side of the court.

``I had so many chances to break him and I couldn't and I was a little bit upset at that,'' said Safin, adding that he crunched the racket to let off some steam. ``It was very important.''

In the end, he closed with a pair of aces, taking his total to 29 for the match. He next faces Slovakia's Dominik Hrbaty, who beat the other Swedish Johannson in the draw _ 2002 Australian Open champion Thomas Johansson _ 7-5, 6-3, 6-1.

Federer has won 48 out of his last 50 matches, and hasn't lost since the second round at the Athens Olympics last August.

Baghdatis broke Federer's serve once and stunned the 23-year-old Swiss star with some brilliant crosscourt forehands in the third set.

Federer, who beat Baghdatis at the last U.S. Open in the 19-year-old Cypriot's only other appearance at a major, fell behind 3-0 in the tiebreaker before reeling off five straight points.

``I enjoyed the battle for sure,'' said Federer. ``After I've won, it's always good to battle it out and win it.''

Two of Russia's three Grand Slam title holders are into the quarterfinals.

U.S. Open champion Svetlana Kuznetsova pounded 29 winners to overcome one Russian _ 6-4, 6-2 over Vera Douchevina _ and faces another in the quarterfinals.

Wimbledon champion Maria Sharapova, seeded fourth, will face Kuznetsova next after coming back from a set and a break down to beat Italy's Silvia Farina Elia 4-6, 6-1, 6-2.

The 17-year-old Sharapova ran off seven consecutive games and broke Farina Elia's last seven service games.

``I'm excited. I know it's going to be another tough match,'' Sharapova said of Kuznetsova. ``I'm prepared. I'm just going to go out like I've been going out and playing my game, having fun, enjoying it and fighting to win.''

Three of the seven Russian women who made the fourth round are already out.

Seventh-seeded Serena Williams, who won here in 2003 but didn't return last year because of an injured knee, was clearly angry with herself as she dropped a set for the first time this tournament before recovering to beat No. 11 Nadia Petrova 6-1, 3-6, 6-3.

Second-ranked Amelie Mauresmo of France had a 6-2, 6-4 win over Evgenia Linetskaya in a mistake-prone match with 11 service breaks.

Mauresmo raced to a 4-0 lead but needed a medical time out after dropping her serve for the first time and returned to court with her left thigh wrapped.

She had trouble on serve after that, dropping it once again in the first set and twice in the second.

Juan Ignacio Chela was fined US$2,000 (euro1,530) by tournament referee Peter Bellenger for unsportsmanlike conduct in his third-round loss to against No. 3 Lleyton Hewitt on Saturday night.

Chela became angry when he thought Hewitt celebrated too much on an unforced error that had given the Australian triple break point.

He drove his next serve at Hewitt, allowing the Australian to convert the break, and then appeared to spit toward Hewitt when the players were switching sides.

``He spat in my direction,'' said Hewitt. ``It's sad that something like that happens. But, you know, he apologized at the net when we shook hands.''

Chela denied spitting at Hewitt.