As Spain, Portugal and Greece plunged into deep recession in the global financial crisis of 2008, unemployment rates urged, reaching 50 percent in Spain and Greece among the youth.
Faced with a glut of unfilled jobs in Germany, where the economy is booming and the working population is ageing, Chancellor Angela Merkel in 2011 launched a call for young Spaniards to seek employment here.
In 2013, Berlin and Madrid signed a deal reserving 5,000 apprenticeship spots and full-time posts for Spanish school-leavers.
Between 2008 and 2015, more than 47,000 Spaniards and 27,500 Greeks aged 18 to 25 arrived in Germany seeking work, according to figures from Germany's statistics office Destatis.
But several years on, the immigration trend appears to be inversing.
The number of young Spaniards who have left Germany soared from 2,800 in 2012 to 4,300 in 2015, according to Destatis, as their home economy started to recover.
Albert del Barrio from Valencia was among those who benefited from Germany's welcome.
After a year's exchange programme at a Prague university where he met his Italian girlfriend, he decided to move to Berlin, where “we can speak English” in his sector, he told AFP.
He found work quickly in a start-up for smartphone industry marketing.
“Clearly there are many more job opportunities in Germany,” he said.
Some 600 kilometres (400 miles) to the south of Berlin, another Spanish national, 31-year-old Jose Ramon Avendano Fuentes is in an apprenticeship at an electricity firm.
The idea of trying his luck in Germany came from his employment agency in Albacete in 2014, after he failed to land a job at home.
“They told me that it's possible to find a job in Germany where they really need people,” he said in halting German.
Since then, Fuentes has managed to integrate into life in Tacherting, a small south-eastern village with 5,000 people located close to the Austrian border.
He now plays in a local orchestra and has no qualms about walking around in traditional Bavarian men's wear — lederhosen.
“I have about 500 colleagues, most of them are great,” he said.
But some are returning to their home countries, disillusioned after struggling to fit in in Germany, where they sometimes find themselves with precarious contracts.
Even del Barrio and Fuentes, who have found what they were seeking in Germany, don't see themselves living here in the long run.
“I would like to stay another two or three years in Germany, but after, well, life can change a lot,” said Fuentes, who will finish his job training in February but is still waiting to land a full-time post.
Del Barrio is also eyeing a return to his homeland.
Although the Spanish economy has been recovering, with growth expected to reach 3.1 percent this year, del Barrio acknowledged that the recovery remains fragile.
Nevertheless, he added: “I'm sure it will improve.”
In fact, as more southern Europeans mull packing their bags and heading home, some have even set up consulting services to help them ease back into their local job markets.
Sebastian Sanz, co-founder of a Madrid-based help group called “Volvemos” (“We're coming back”), told AFP that there is an “enormous desire” from the part of Spaniards to return.
Those who fail to find a footing in Germany's vital engineering or high-tech manufacturing industries often find themselves having to re-examine their ambitions, he said.
Some are increasingly “disillusioned” after spending some time in the north, said Sanz, pointing to nurses for instance, who he said found that they are “more valued in Spain than in Germany”.
Javier Alarcon is one of those who went back to Spain after four years in Germany with his wife and children.
“We were alone there while our families were back in Spain. With two babies, it just got too complicated,” Alarcon, who was a project leader in the German auto industry, told German public radio.