Alize Cornet of France reacts after scoring a point during the Rogers Cup on August 8, 2018 in Montreal, Quebec, Canada.

The chair umpire for the match, Christian Rask, immediately issued a warning for unsportsmanlike behavior. Cornet, ranked No. 31 in the world, stared back in confusion.

Cornet took 10 seconds to remove her shirt, briefly showing Flushing Meadows spectators her sports bra, after she realized she put it on backwards during a break in between the second and third sets. She deliberately turned away from television cameras before doing so.

French tennis player Alize Cornet was given a code violation by US Open officials on Tuesday after she temporarily took her shirt off during her first-round match loss to Johanna Larsson. The violation sparked debate about whether USTA officials were being sexist and was later called "unfair" by the WTA.

The U.S. Open issued a statement Wednesday noting that, "All players (men's and women's) can change their shirts when sitting in the player chair. This is not considered Code violation.

"We regret that a Code violation was assessed to Ms. Cornet yesterday. We have clarified the policy to ensure this will not happen moving forward."

More from USA Today:

Roger Federer happy to be healthy, back at US Open and into Round 2

With soaring temps in NY, US Open has new heat rule that also protects men

Browns LB Mychal Kendricks admits to insider trading after federal charges

The code violation "was unfair and it was not based on a WTA rule, as the WTA has no rule against a change of attire on court," the WTA said in a statement Wednesday.

"The WTA has always been and always will be a pioneer for women and women's sports. This code violation came under the Grand Slam rules and we are pleased to see the USTA has now changed this policy. Alize did nothing wrong."

Guidelines in the Grand Slam rule book state that female players are given change of attire breaks upon request.

In all cases of players taking toilet breaks or change of attire breaks, the nearest assigned bathroom should be used, according to the Grand Slam rule book. "Additional breaks will be authorized but will be penalised ... if the player is not ready to play within the allowed time.

"Any player abuse of this rule will be subject to penalty in accordance with the Unsportsmanlike Conduct section of the Code of Conduct," the rules stated.

Tweet

Although Cornet's shirt change was a spur-of-the-moment situation that US Open officials further assessed Wednesday, it quickly prompted a sexism debate over social media on Tuesday given that male players often change their shirts in front of crowds — particularly during the latest heat wave in New York. Both Novak Djokovic and Roger Federer were seen on television Tuesday changing their T-shirts during their matches. That was while they were sitting, however.

Former British tennis player Judy Murray came to Cornet's defense Tuesday, initially suggesting there was a double standard over Twitter. Fellow tennis players Casey Dellacqua and Bethanie Mattek-Sands also expressed frustration over social media.

The clothing issue comes on the heels of French Open officials banning Serena Williams' catsuit outfit in the future, to which Williams batted down the uproar being an issue. "It's fine," she told reporters earlier this week.