Officials said condition is expected to reverse after kids stopped taking the drug. (Representational)

At least 17 children developed so-called "werewolf syndrome" in a major medicine mix-up in Spain, the health ministry said Wednesday.

They are suffering from the rare condition known as hypertrichosis that causes abnormal hair growth.

The alert was given in June after parents started noticing their kids -- some of them babies -- were growing hair all over their body after taking what they thought was omeprazole, a drug that helps with gastric reflux.

After investigating, authorities discovered the drugs they took actually contained minoxidil, a medication used for the treatment of hair loss.

Health Minister Maria Luisa Carcedo told reporters they found that the bad batches came from a laboratory that had "put this medication (minoxidil) in a container that was marked omeprazole" and distributed it to pharmacies as such.

It is unclear how the laboratory FarmaQuimica Sur, a supplier of active ingredients and pharmaceuticals based in the southern city of Malaga, made the mistake.

A health ministry spokesman told AFP that 17 children had so far been affected in the northern region of Cantabria, Andalusia in the south and Valencia in the east.

In a statement, the ministry said the condition was expected to reverse after the children stopped taking the drug, which has been withdrawn from the market.

Carcedo said the laboratory had been closed as a precaution.

A spokeswoman for Andalusia's health department told AFP that the four affected children in the southern region -- three babies and a seven-year-old -- were doing well.