The Spanish government has reached a deal on fuel subsidies with fishermen who had been blocking sea ports.
Fishing co-operatives around Spain joined the protest
Minister for Agriculture, Fisheries and Food Elena Espinosa said the deal had been reached after 18 hours of talks with fishermen's groups.
The deal includes a subsidy of 9.5 euro cents (6.4p) per litre of diesel fuel. Fishermen had been holding out for 13.
The blockade, which started on Sunday, prevented cargo and cruise ships from docking and left markets without fish.
The ministry said the deal included developing a plan to help revitalise the fishing industry.
The president of the Federation of Fishing Societies, Juan Cervantes, told El Pais newspaper it was not a bad deal, but not the one they had hoped for.
He said fishing leaders had given orders to end the blockades. He also apologised to the Spanish public and businesses for the harm caused.
On Wednesday, about 5,000 tourists were caught when traffic between Barcelona and the Balearic islands was halted and ferry services between Malaga and North Africa were suspended.
Two ferries with 700 passengers on board were also prevented from leaving Valencia in eastern Spain.
Barcelona's port authorities say the blockade was costing the industry about 2.9m euros (£2m) a day.
The BBC's Katya Adler, in Madrid said the blockades spread on Sunday after talks broke down between the Spanish government and fishermen who say fuel accounts for more than 40% of their running costs.
Until 30 September, the subsidy had been six euro cents a litre.