A sweat-soaked Andy Roddick handed his racket to a ball boy to play the next point, then staggered to the corner of the court and plopped himself down, gasping air.

More than 80 games and 41/2 hours into his quarterfinal against Younes El Aynaoui, Roddick figured the lighthearted gesture might ease the tension in what already was the longest Australian Open match in more than 30 years.

Or at least buy him some time to catch his breath.

Groaning from the strain of chasing shots, covering their faces after lost opportunities, Roddick and El Aynaoui traded serves and strokes past midnight, neither willing to give in.

In the end, Roddick had just enough in reserve to finally edge El Aynaoui, 21-19, in the fifth set today and reach his first Grand Slam semifinal.

"Strategy was out the door; it was just pure fighting," the ninth-seeded Roddick said.

"My respect for him just grew and grew throughout this match, and I'm sure it's vice versa. I don't even remember ever talking to Younes before this match. But we could see each other 10 years down the line and know we did share something pretty special."

His 4-6, 7-6 (7-5), 4-6, 6-4, 21-19 triumph lasted 4 hours 59 minutes. The fifth set was the longest in the Open era (which started in 1968), taking 2:23 alone -- or 21 minutes longer than Andre Agassi's quarterfinal victory over Sebastien Grosjean lasted in its entirety.

By the end, El Aynaoui's legs shook from fatigue.

"I know I wasn't far from winning that match," said El Aynaoui, who upset No. 1 Lleyton Hewitt in the fourth round. "I'm a bit disappointed now, but I had a great tournament."

And the 18th-seeded Moroccan's stay ended with a superb match, full of brilliant strokes. He actually had more winners than Roddick, 107-102. But that edge was erased by unforced errors: El Aynaoui had 55, Roddick 31; those are amazingly low totals given how long the match was.

Each applauded nice shots by the other. Each argued close calls. Upset by a double fault that handed Roddick his first break of the match to open the fourth set, El Aynaoui spiked his racket so hard that it nearly hit a linesman.

But the best showmanship came at 19-19 in the final set, when two weary warriors found a way to smile. Roddick -- who until this tournament had just one career five-set victory -- relinquished his racket, encouraging a ball boy to try to return El Aynaoui's serve. Going along with the joke, El Aynaoui gave his racket to another ball boy. The kids hit a few shots back and forth; the players enjoyed a short respite.

El Aynaoui didn't think it was gamesmanship -- but he was well aware what happened when play resumed.

"I got broken right after that," he said. "Maybe I lost concentration a little bit."

Two games later, it was over, when El Aynaoui sent a forehand volley into the net.

Roddick's next opponent will be 31st-seeded Rainer Schuettler, who eliminated Wimbledon finalist David Nalbandian, 6-3, 5-7, 6-1, 6-0. Agassi plays Wayne Ferreira in the other semifinal.