The next day, about 700 other migrants from Africa tried unsuccessfully to storm the border crossing between Morocco and Ceuta, a tiny Spanish enclave on Africa's northwest tip.
More than 11,000 migrants arrived in Spain in the first half of this year, compared to over 13,000 in all of 2016.
Most migrants are crammed into flimsy toy boats, raising fears over their safety, said Krzysztof Borowski of the agency.
The numbers have dropped significantly since then, in a large part due to a deal the European Union struck with Turkey to keep migrants there.
Spain could overtake Greece this year in the number of migrants arriving by sea, the International Organization for Migration (IOM) said Thursday, coming shore on boats and even jet-skis.
However, overall numbers of migrants have fallen by nearly 60% from the same period the previous year.
Experts say it's hard to pinpoint why the water route to Spain via Morocco has become a preferred option for some migrants.
Zahara de los Atunes is one of the southernmost parts of Spain: The beach, popular with tourists and known for its tuna, is less than eight miles from the coast of North Africa.
The bodies of 25 migrants have been recovered along the route this year, but the total number of deaths is likely to be far higher as most corpses are never found, Borowski added.
According to the UNHCR representative, Spain has to get ready to protect the needs of those newly arriving, identify people in need of protection and those with special needs, like minors or potential victims of trafficking.
IOM figures showed that 121 migrant deaths were registered along the Spanish route in 2017, while Italy saw 96,861 arrivals in the same period, with 2,242 deaths registered on that route.
The good weather over the past few weeks seems to have led to a sudden increase in the number of migrants arriving in Spain.
This is a different tactic to many migrants arriving from Libya, who are often packed onto leaky, overloaded boats, with the intention of summoning aid as quickly as possible.