As 16-year-old Moroccan Ayoub El Abyad scrolled through Instagram videos showing migrants crossing into the Spanish enclave of Ceuta, he and his cousin, then still a 12-hour drive from the border, decided to try their luck."Migration is about improving our lives. We agreed we would try the idea of crossing and trust in Allah," El Abyad told Reuters on the Moroccan side near the border with Ceuta, after completing the journey by hitching rides with two drivers.

El Abyad was hoping to be one of roughly 60,000 migrants who entered the Spanish territory of Ceuta from Morocco this week, in the biggest surge in recent history.

In Morocco, where deep-seated anger towards poor public services and poverty spilled over late last year into major protests, many young people spend years waiting for a chance to cross the border in search of better prospects.

A quarter of Moroccans aged between 15 and 24 are not in education, employment or training, official data show.

When reports spread on social media about a Spanish Supreme Court ruling earlier in July that migrants intercepted at sea while trying to reach Ceuta or Melilla could not be immediately turned back, many saw an opportunity.