MADRID — Spain’s Iberia airline has decided to scrap a pregnancy test for new employees after it was fined $29,000 by a regional government for discrimination.

The airline said in a statement Monday that the test had been purely a precautionary measure taken in the interest of the baby and future mother, and denied that it rejected pregnant women for jobs.

The decision came after the Balearic Islands’ regional labor department fined the company after an inspection last year.

Iberia said it had contracted five pregnant women last year and actively backed a policy of employing women.