In front of a packed Arthur Ashe Stadium, it’s hard for tennis players to have a moment of privacy when they need one, especially when they need to vomit.

Before the fifth set of Carlos Alcaraz’s 6-7 (5), 6-1, 6-3, 1-6, 7-6 (10-7) loss to Ben Shelton in the U.S. Open quarterfinal, which ended at 3:33 a.m. ET Wednesday morning, the Spaniard was not feeling well.

Alcaraz was sitting on his courtside chair when the camera came around on his right. Knowing that he was about to vomit, he shooed the camera away, trying to spare viewers from an ugly scene.

CLICK HERE FOR MORE OUTKICK SPORTS COVERAGE

The camera eventually retreated behind Alcaraz, but the tennis star remained persistent in his efforts to gain privacy. Eventually, he puked into his towel.

“I mean it was close, it really was close, so I was disappointed I didn’t get the win in the end, but I’m just happy … physically I was really tired, but I found a way to push myself,” Alcaraz said after the match.

He said he started to feel better in the fifth set, but it wasn’t enough to advance.

The U.S. Open was the first tournament Alcaraz participated in since he was sidelined for more than four months with a wrist injury. While he lost to Shelton in a thriller and had his 18-match Grand Slam winning streak snapped, he was proud of his effort.

THE CRAIG CARTON SHOW–UNFILTERED, UNAPOLOGETIC AND UNMISSABLE. DOWNLOAD HIS DAILY PODCAST NOW!

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

“I leave the court happy,” Alcaraz said. “I leave the court with a smile. I am proud of myself, how I fought.”

Alcaraz praised Shelton, calling the American a “beast.”

“Shelton played a very complete, very mature match,” Alcaraz said in Spanish. “He knew exactly what to do at every moment. And, physically, he’s a beast. It seemed like he had no weaknesses whatsoever.”

For Shelton, the win was the biggest of his career as he moved one step closer to the U.S. Open final.

STAY “FEARLESS” ON THE GO! TAKE TOMI LAHREN WITH YOU. DOWNLOAD THE TLIF PODCAST NOW!

“It was a war,” Shelton said. “Carlos is one of the greatest champions of our sport. It was the most enjoyable match I’ve had in my career, for sure.”

Shelton will face fellow American Frances Tiafoe in the semifinal on Friday, guaranteeing that an American will be in the U.S. Open final.

The Associated Press contributed to this report.