By the Associated Press

BARCELONA, Spain (AP) — Spanish authorities pulled 493 migrants from eight rickety boats in the Mediterranean Sea on Monday yet blocked a humanitarian rescue ship from leaving the port of Barcelona, saying it violated maritime regulations on previous trips.

An order from Spanish authorities to the aid group Proactiva Open Arms, seen by The Associated Press, said their boat had violated maritime regulations “to leave those rescued at sea at the nearest port.” This happened on the boat’s most recent mission in December, when some 300 migrants saved near Libya were taken to Spain.

Spain’s merchant marine issued a statement saying Proactiva’s ship “had to cross the Mediterranean for several days to bring its migrants to land, putting in jeopardy the security of the boat, its crew and the people rescued.”

The aid group has appealed the decision, arguing that the ship only came to Spain after both Malta and Italy had turned it away.

“The boat has all its inspections, licenses and papers in order and was ready to sail” on another mission to waters near Libya when Spanish authorities blocked it, Proactiva Open Arms President Oscar Camps told the AP.

“It is just as detrimental for Italy to close its ports to us as for Spain to stop our boat from sailing for an unfounded administrative cause,” Camps said. “Stopping our boat for a long time means more deaths in the Mediterranean.”

Proactiva Open Arms says the ship has rescued 5,619 people in the Mediterranean Sea since July 2017.

Spanish Prime Minister Pedro Sanchez made the plight of migrants one of his banner causes when he took office in June. His government has allowed several aid boats that rescued migrants at sea to dock after they were rejected by Italy and other countries taking a hard line against immigration.

Spain now has become the busiest point for migrants entering Europe illegally. The European Union border agency says about 57,000 unauthorized crossings to Spain took place in 2018 — double the figure for 2017 — while migrant arrivals for Europe overall reached a five-year low.

Crossing the Mediterranean in unseaworthy smugglers’ boats is still a dangerous journey — around 2,300 people died last year trying to reach Europe that way, according to the International Organization for Migration.