MADRID—Spain’s mainland has for the first time surpassed Italy and Greece to become the main entry point for migrants arriving in Europe from Africa by sea.

Overall, the number of arrivals in Europe has fallen sharply in the last year. But the growing number of migrants flowing through Spain in particular shows that Africa’s borders remains porous.

The...