The Spanish airline Iberia has said it will stop requiring female job candidates to take a pregnancy test after being fined for the practice.
It had been discovered requiring the test by labour inspectors in the Balearic Islands, and fined €25,000 (£22,000; $28,000).
The airline argued it had only been trying to “guarantee that [pregnant women] did not face any risks”.
But this explanation drew ridicule on social media.
“You need help to improve your arguments,” tweeted one blogger, Eva Snijders, having earlier tweeted, “Hello, we are Iberia and we live in medieval times.”
The airline practice was uncovered after a campaign on the Balearic Islands to combat discrimination in the workplace, reports El Pais in English.
Inspectors subsequently found Iberia had required a recruitment company, Randstad, to carry out the test on candidates along with other medical checks, the paper says.
Iberia insists it did not turn down candidates discovered to be pregnant, saying five had been hired. It also reportedly argues that requiring pregnancy tests is commonplace in Spain.
But Spanish Health Minister Dolors Montserrat said she “rejected” the practice.
“Maternity can in no way be an obstacle for access to a job,” she told reporters.
Iberia, which merged with British Airways in 2010, is free to appeal against the fine imposed by the Balearic regional government.