(Adding vote, background)
MADRID, May 18 (Reuters) - Spain's lower house of parliament narrowly passed a long-delayed reform of port operations on Thursday, bringing regulation closer to that of the European Union though the overhaul has been slammed by unions that have threatened widespread strikes.
The decree, which was rejected the first time it was given to legislators in March, aims to liberalise hiring in a sector strictly controlled by the unions and comes after months of fines by the EU for not adhering to European regulation.
Members of parliament voted 174 for the reform and 165 against, with eight abstentions.
The European Commission has fined Spain more than 21 million euros ($23.4 million) since 2014 for not overturning labour practices and bringing them in line with EU regulation and has said that fine would be increased if a reform was not passed.
The proposal had been sent to Brussels and has been given the go ahead, Public Works Minister Inigo de la Serna said on Thursday.
Spain is home to the Mediterranean's two largest ports, Valencia and Algeciras, as well as the smaller port in Barcelona. Some two thirds of Spain's imports and exports, a key element of the recovering economy, are moved through the country's docks.
The latest version of the reform won support after the government toned down its stance on workers contracted to load and unload vehicles due for import and export, prompting the nationalist Catalan party PDeCAT to abstain.
The unions said last week, after the government announced the details of the reform, it would call eight days of industrial action - four in May and four in June - if the parliament ratified the law.
Port workers association Anesco has said that it had seen a slow down in production levels on the country's docks since Tuesday, calling it an unofficial strike. ($1 = 0.8983 euros) (Reporting by Rodrigo de Miguel and Robert Hetz; Writing by Paul Day; Editing by Angus Berwick and Ralph Boulton)