United Airlines
United Airlines defended its actions after facing backlash on social media Justin Sullivan/Getty Images

United Airlines is facing a barrage of criticism after one of its gate agents barred two girls from boarding a flight for wearing leggings.

The airline defended its action by saying that the girls were travelling under a United employee pass and were not dressed in accordance with the relevant dress code policy.

The incident became public when witness Shannon Watts tweeted that a gate agent at Denver International Airport would not allow the teenagers to board the Minneapolis-bound flight.

Watts told the New York Times that she noticed two visibly upset teenage girls, both wearing leggings, at the gate next to hers.

When she went to the gate, she also saw a "frantic" family with two young girls, one of whom was wearing leggings, having a tense conversation with a gate agent.

Watts said the girl's mother told her that the teenagers had been turned away because their pants were deemed inappropriate travel attire. The mother had a dress in her carry-on that her daughter was able to pull over her leggings.

Only then was the family allowed to board their flight.

"The girl pulled a dress on," Watts told the Times.

"But please keep in mind that the dad had on shorts that did not hit his knee — they stopped maybe two or three inches above the knee — and there was no issue with that."

Watts estimated that the two girls barred from the flight were in their "young teens". The girl who was allowed on with her family after putting on a dress was around 10 or 11 years old, she said.

United stood firm on its decision, defending it in a series of tweets to Watts and others.

United Airlines spokesman Jonathan Guerin said that pass travellers represented the company and had to comply with its dress code. This includes not being allowed to wear Lycra or spandex leggings, tattered or ripped jeans, midriff shirts, flipflops or any article of clothing that show undergarments.

"Its not that we want our standby travelers to come in wearing a suit and tie or that sort of thing," he said. "We want people to be comfortable when they travel as long as it's neat and in good taste for that environment."

The company's response only further elicited criticisms online, including from several celebrities.

Watts told the Washington Post: "I have five kids: four of them are women. They wear yoga pants all the time when flying. This policy is arbitrary and sexist. It singles out women for their clothing and sexualises little girls."