The court, which deals with major cases, announced Wednesday it had cancelled the statutes of the “Organisation of Sex Workers”, which was registered by the labour ministry and published in the official gazette on August 4th.
It ruled that a union cannot defend members who carry out “activities that by nature don't come with a valid work contract”.
It added that giving the green light to such a union would equate to “admitting that pimping… is a legal activity”.
The OTRAS union, which promises to defend the rights of people in the industry, had argued it doesn't only represent prostitutes but also pornographic film actors or phone sex operators.
But the court said that not excluding prostitutes meant it was illegal.
- 'Let us keep our union': Spanish sex workers demand equal labour rights
- Spain's anti-prostitution PM riled as ministry green-lights sex workers union
OTRAS said it would appeal against the court's ruling and hold its first congress on Saturday in Barcelona to finalise its structure.
“In the 19th century, there were no unions in hotels, in mining or industry,” OTRAS secretary general Concha Borrell told a news conference.
Spain's fiercely anti-prostitution Prime Minister Pedro Sanchez had been left red in the face in August when news of the approval of the union emerged.
Sex work is tolerated in Spain — neither illegal nor regulated — but Sanchez came to power in June with a strongly feminist agenda promising to fight the exploitation of women.
The labour ministry had promptly launched proceedings to challenge the union's existence in court.
Labour Minister Magdalena Valerio told reporters at the time she was shocked by the fact such a union had been approved by her ministry's labour directorate general.
“As a minister and member of a feminist government, I would never have given the OK for this to be published in the official state gazette,” she said.
Valerio added this has been one of “the biggest” upsets in her life.