"We are blocked in a port once again. Port Authority in Barcelona denied permission to Open Arms to sail #Med Central," the charity based near the Catalan capital wrote in a tweet. "Preventing us from saving lives is irresponsible and cruel," said Proactiva Open Arms founder Oscar Camps in a separate tweet, accusing "cowardly politicians" of putting migrants' lives at risk.
Proactiva Open Arms operates in between Libya and southern Europe, coming to the aid of migrants and asylum seekers who get into life-threatening difficulties during the sea crossing from northern Africa.
The charity's rescue ship, Open Arms, docked in southern Spain on December 28 with 311 mainly African migrants it had rescued a week earlier off the coast of Libya after both Italy and Malta denied it entry.
After stocking up with provisions in Barcelona, the ship had been due to set sail again on January 8 but Barcelona's Port Authority prohibited it from leaving, a Proactiva Open Arms spokeswoman told AFP.
The charity appealed the decision two days later, requesting that it be allowed to put out to sea to carry out "observation and surveillance tasks in the central Mediterranean."
In a statement, Spain's public works ministry, which controls the Port Authority, said Spain has no maritime rescue jurisdiction off the Libyan coast where Open Arms operates and had violated maritime regulations on past rescue missions.
Since the boat lacks permission to dock in countries near where it operates, "it has had to cross the Mediterranean for several days to disembark rescued migrants, putting the safety of the ship, its crew and the people on board at risk," the statement added.
Shortly after he came to power in June, Spanish Prime Minister Pedro Sanchez allowed the Aquarius, a boat chartered by the aid groups SOS Mediterranee and Doctors Without Borders, to dock in Spain with more than 600 migrants on board.
His Socialist government also allowed the Open Arms to dock in Spain but in August refused once again to receive the Aquarius.
Spain became Europe's main entry point for migrants last year, overtaking Greece and Italy, which have taken measures to prevent rescued migrants from landing at its ports.
More than 55,000 migrants arrived in Spain by sea in 2018, according to the UN refugee agency. As of November last year, more than 600 African migrants had died trying to reach Spain since the start of the year, almost three times more than in all of 2017.