NEW YORK – More than an hour after hitting one last shot as a professional tennis player, then delivering one last, voice-wavering speech to an adoring U.S. Open audience, Andy Roddick exited the locker room one last time.

Accompanied by his wife and other family members, a black baseball cap tugged low over his eyes, Roddick slung a racket bag off his aching right shoulder — the one responsible for so many high-speed aces, violent forehands and the most recent Grand Slam title by an American man — and tossed the equipment in the back of a waiting van.

Won’t need that any longer.

Serenaded by choruses of “Let’s go, Andy!” that rang through Arthur Ashe Stadium in the closing moments of his career, the 2003 U.S. Open champion headed into retirement with a 6-7 (1), 7-6 (4), 6-2, 6-4 loss to 2009 champion Juan Martin del Potro of Argentina in the fourth round at Flushing Meadows on Wednesday.

“If we do badly, then it costs us something; if we do well, we get great things. This was about something bigger. It wasn’t about ranking points or paychecks or anything else,” Roddick said. “This week I felt like I was 12 years old, playing in a park. It was extremely innocent. That was fun. I enjoyed it.”

His defeat was significant, if not as unexpected as top-seeded Roger Federer’s 7-6 (1), 6-4, 3-6, 6-3 quarterfinal loss was several hours later against No. 6 Tomas Berdych of the Czech Republic. Federer won five of his record 17 Grand Slam championships at the U.S. Open and was bidding to reach the semifinals in New York for the ninth consecutive year.

But Federer’s famous forehand was way off most of the evening, while the 6-foot-5 Berdych kept pounding fast serves and dangerous groundstrokes right where he wanted them.

It was Berdych’s fourth victory in his last seven meetings against Federer, including in the 2010 Wimbledon quarterfinals en route to a runner-up finish there. Now Berdych will play Olympic champion Andy Murray for a berth in the U.S. Open final.

It was appropriate that Roddick would leave tennis at Flushing Meadows, which is why he surprisingly announced last Thursday, his 30th birthday, that the U.S. Open would be his final tournament.

A perfect bookend: He visited the hard-court Grand Slam tournament at age 9, a trip his parents gave him as a birthday present.

Del Potro’s quarterfinal opponent will be defending champion Novak Djokovic, who advanced when No. 18 Stanislas Wawrinka stopped playing Wednesday because of illness and fatigue while trailing, 6-4, 6-1, 3-1.

Like Murray, four-time major champion Maria Sharapova constructed quite a comeback in her quarterfinal, erasing a 4-0 deficit and defeating 2007 Wimbledon runner-up Marion Bartoli 3-6, 6-3, 6-4. Sharapova is 12-0 in three-set matches this season.

“It’s a great statistic,” Sharapova said. “It shows that I enjoy the battle, no matter what the score is.”

No Sharapova-like or Murray-esque theatrics were required by Serena Williams, who has won three of her 14 Grand Slam titles at the U.S. Open. She hit 12 aces in her latest dominant performance, a 6-1, 6-3 victory over 2008 French Open champion Ana Ivanovic.

Williams’ semifinal opponent will be 10th-seeded Sara Errani of Italy, who eliminated her good friend and doubles partner, No. 20 Roberta Vinci, in straight sets.

Before the drama of Berdych vs. Federer under the lights at night, the story of the afternoon was Roddick’s departure — from the tournament and from tennis. Williams watched his loss to del Potro before taking on Ivanovic in the same stadium Wednesday night.

“He’s been the ultimate inspiration for me. Just a great guy, and he did so much for American tennis,” Williams said. “I’m really kind of sad.”

In the end, Roddick chose to walk away after a series of injuries, particularly to his shoulder, made it too tough to remain in the game’s upper echelon.

A member of the top 10 at the end of nine consecutive seasons, he slid to No. 34 in March, which was his lowest ranking since 2001.