Updated

The Spanish government has suffered a setback in its effort to liberalize its port operations, as required by the European Union, after losing a parliamentary vote.

Thursday's vote was the first time since 1979 that opposition lawmakers in Spain were able to vote down a government decree, highlighting the weak position of Prime Minister Mariano Rajoy's minority government.

The decree would have allowed companies to hire freely workers to load and unload cargo, ending a decades-old practice of employing members of an association.

Spain has accumulated 23 million euros ($24.7 million) in fines from the EU since 2014 and the European Commission has said it will seek to increase the fines if the liberalization of the industry doesn't go ahead.