Men in Spain will now be able to take time off during the period when their children are breastfeeding, Spanish news agency Europa Press reported on Wednesday.
Spain's Central Dispute Tribunal Court 11 made the decision after an appeal from a public servant who works for the police.
The man in question said that he should be able to share breastfeeding leave with his wife — also employed by the police — and twin sons.
A judge upheld the decision saying the current legal criteria were "restrictive".
The judge added that breastfeeding permission was "not exclusive to mothers" and applied to "both parents".
The presiding judge said that Spain's Equality Law and the Public Service Statute both clearly aimed to help people balance the needs of work and family life and upheld the appeal.
Spain's Public Administration was ordered to pay the costs of the appeal.
The court said the mother — a working judge — had asked for five weeks breastfeeding leave and had then decided to give the last three weeks to her husband.
But the authorities refused the father permission to take that leave.
Article 48.1 of Spain's Public Service Statute currently states that leave can not be shared by parents and must be taken by either one parent or the other.
In this case, however, the father appealed to the Equality Law (3/2007) and argued that laws need to be applied in the social context of the time when they are applied.