BARCELONA, SPAIN - Slouched on a bench at a Barcelona police station, five teenagers waited patiently on a recent Friday evening to find out where they would sleep that night: a shelter for young migrants or on that bench.
Earlier that day, another group of boys had been successfully transferred to a nearby shelter, but it was uncertain if any more beds were available.
The boys from Morocco and sub-Saharan Africa had all entered southern Spain as unaccompanied minors, crossing from Morocco on what this year has become the biggest migrant route into Europe. Like thousands of other teenagers, mostly Moroccans, they made their way to Barcelona, a city known to many of them for its legendary soccer club.
Official figures show that 11,174 unaccompanied minors were registered from January until the end of September - up from 6,414 in all of 2017.
Sabir, 13, tried to explain why he made the perilous journey, leaving his mother behind.
'The reason every Moroccan comes to Spain: To work,'' he said. The Associated Press is identifying the boys interviewed for this story only by their first name in line with Spanish privacy rules on minors.
To many, life in Spain is not what they had imagined.
Instead of finding work, which many are too young for anyway, they end up being transferred between reception centers or sleeping in the streets as authorities struggle to provide housing. Some get caught up in drugs and petty crime in Barcelona.
These boys embody the problems that nations are trying to solve by adopting the world's first migration accord this week. The non-binding U.N. pact being finalized Tuesday aims to help countries cooperate to manage migration; yet the U.S. under Donald Trump and several European countries are refusing to sign on.
Spain has seen growing numbers of migrants after Italy began to stem the flow of sea arrivals from Libya last year. But the reasons for the surge in Moroccan boys are unclear, though high youth unemployment and a government crackdown on protesters in the northern Rif region are believed to be among them.
Barcelona, the capital of the prosperous Catalonia region, has been particularly affected. It's a popular destination for many boys partly because it's relatively close to the border with France, where some of the boys hope to go eventually.
The surge in minors prompted Catalan authorities to open 120 shelters with over 2,000 beds in less than a year, including in small rural towns.
'The volume of arrivals of children traveling alone in Catalonia has been absolutely disproportionate,'' said Georgina Oliva, who heads the regional government office responsible for the minors.
According to local figures, there are over 3,000 unaccompanied minors in Catalonia. The number is three times higher than that recorded by the Interior Ministry, highlighting the difficulty in keeping track of the young migrants, some of whom run away from the shelters they're assigned to.
Sabir left a shelter in a small Catalan town and returned to Barcelona together with Astraf, a 17-year-old from Tangiers, Morocco.
'No one likes to live in the mountains,'' Astraf said.
More than 57,000 migrants of all ages have arrived in Spain this year, most of them by sea, according to the U.N. High Commissioner for Refugees. That's a 130 percent increase since last year, and means that Spain has overtaken Italy and Greece as the main entry point for migrants coming to Europe.
Overall, the number of migrants crossing the Mediterranean is down about 30 percent from last year.
For Oriol Amoros, who heads the office in charge of migration in Catalonia, the young age of the migrants is more worrisome than their numbers.
'From a demographic point of view, it is a not a very big influx, but it is an influx of very vulnerable people who require a considerable effort when receiving them,'' he said, highlighting that minors are by law entitled to legal protection, care and education.
Spain has adopted a more welcoming attitude toward migrants than many other European countries under the center-left government that took power this year. But not everyone concurs. An upstart far-right political party campaigning against migrants - particularly Muslims - recently won its first seats in a regional assembly in the southern region of Andalusia, the entry point for many migrants coming to Spain.
Alhadji, 16, arrived in Spain in July after fleeing poverty in his native Guinea-Bissau two years ago. He is among 110 underage boys from sub-Saharan Africa set up in a hotel on the outskirts of Barcelona, where he shares a room with four other teenagers. On the wall hangs a photo of soccer star Cristiano Ronaldo wearing a Real Madrid shirt.
Alhadji is learning to read and write at the shelter; his family couldn't afford to send him to school at home. Despite the hospitality he's received, Alhadji knows he's one of thousands of minors seeking better opportunities, and it will take time before he gets the necessary permits to live and work legally in Spain. If he's lucky, he'll get them before he turns 18.
'They help you a bit. It's not easy, there's a lot of people, it is not just you,'' he said.
In another part of Barcelona, a small group of young Moroccans inhaled fumes from a cloth damped with cleaning chemicals outside an internet cafe. The youngest was 11 and said he smuggled himself into Spain by hiding underneath a truck. Three of the boys said they had left their shelters in rural Catalonia and would sleep in the streets that night.
A Moroccan man passing by stopped to speak with them in Arabic. Mohammed el-Khamraoui said he sympathized with the boys because just like them, he had entered Spain illegally a decade ago aged 15.
'When I see the boys like this, I can't even say anything,'' said el-Khamraoui, who now works as a cook. 'It hurts my soul because I've been in this situation.''