United Airlines forced a 10-year-old flier to change her clothes and barred two other young female travelers from boarding a flight Sunday morning — because they were wearing leggings.

The move sparked widespread online outrage, with critics including a slew of Hollywood celebrities accusing United of being sexist and body-shaming the girls.

“[United] humiliated everyone. They’re sexualizing young girls,” witness Shannon Watts raged to The Post after tweeting about the incident, which she called “Leggings-gate.’’

Model Chrissy Teigen added in a tweet, “I have flown united before with literally no pants on. Just a top as a dress. Next time I will wear only jeans and a scarf.”

United argued that the girls were flying on free friends-and-family tickets from a company worker and that the airline requires such standby travelers to adhere to a stricter employee dress code.

The 10-year-old and the two other girls, both in their early teens, were traveling together from Denver to Minneapolis when they were stopped at the gate. An adult male relative appeared to be with them, Watts said.

The younger girl was finally allowed on the flight only after donning a dress over her leggings.

But the two teens were forced to stay behind because they had no other clothes with them.

Airline spokesman Jonathan Guerin told The Post that the two teens “will modify their clothing to be in compliance and will continue their journey to [Minneapolis].

“When we travel, we are representatives of [United], so we want to look our best and follow all rules associated with that privilege,’’ Guerin said. “It’s casual — you don’t have to wear business attire. We want employees and family and friends to travel comfortably. The attire of that traveler did not meet our rules.”

Gate agents decide whether a freebie flyer’s attire is appropriate on a case-by-case basis, but fare-paying passengers can board United flights in the stretchy form-fitting pants, Guerin said.

United has actually promoted tights in the past, tweeting a photo of a passenger stretching in yoga pants for “International Yoga Day” last year.

While so-called “pass travelers” such as the Spandex-wearing girls are assigned whatever seats are available, and there is often no indication that they are even related to employees, the no-leggings rule for them still applies, according to Guerin.

But the airline’s reasoning did not fly with actress Patricia Arquette, who took to Twitter to decry the decision.

“Leggings are business attire for 10 year olds. Their business is being children,” the Oscar winner wrote during a heated exchange with United.

Comedian Sarah Silverman goaded the carrier to get with the times.

“I suggest u consider updating ur rules 4 friends & fam as they seem to apply mostly 2 females & are outdated,” the fiery feminist and comedian tweeted to United.

Actor William Shatner even weighed in, posting an old photo of himself on the set of “Star Trek” wearing nothing but a crotch-hugging pair of red tights and writing, “I’m going to start wearing leggings! Is that against the rules?”

Funnyman Andy Richter wrote, “@united I have flown numerous times while displaying an egregious mooseknuckle. What’s a male over 10 have to do to get noticed?”

Actor Seth Rogan cracked, “We here at @united are just trying to police the attire of the daughters of our employees! That’s all! Cool, right?

He was responding to this tweet by United: “The customer this morning was a teenage United pass traveler who did not meet our dress code policy for pass riding.”

Actor Keegan Allen from “Pretty Little Liars” tweeted: “Petty. If you want to continue to be the WORST in customer service…keep it up. You’re really achieving it @united dress code anomaly.”

Watts, a Colorado activist and mom of five, contended that the man with the girls was wearing shorts that were no more appropriate than tight leggings.

“[He] had khaki shorts that did not cover his knees, but [the] girl had to put on a dress. It’s sexist,” she said.