United Airlines has told its customers “leggings are welcome,” after it found itself caught in a social media storm after refusing to allow two teenage girls to board their flight because they were wearing leggings.

The American carrier, which is one of the biggest airlines in the world, was accused of sexism and of policing women’s dress after it stopped the two girls from flying from Denver to Minneapolis on Sunday.

Their father, wearing shorts, and a girl aged around 10, travelling with them, were allowed to board – but only when she had put a dress on over her leggings.

But United on Monday insisted they were simply enforcing an existing policy on dress codes for people, such as the girls, travelling on “buddy passes” – discounted travel for friends and family of employees.