It was Mohamed Khaleuf's third attempt to cross the Greek-Macedonian border hiding in a freight train and he had no plans to give up trying. “I promised myself I would try five times. If I'm not successful, I will try to cross from somewhere else,” said Khaleuf, a migrant from Morocco in his early twenties.

Khaleuf is among dozens of migrants, mostly young Moroccans, Tunisians and Algerians, who arrived in Greece in the last year and found shelter in old rusting carriages around a station in the outskirts of Greece's northern city of Thessaloniki.

From there, they monitor freight trains heading to central Europe. Whenever trains stop in the station, the migrants try to sneak into their compartments or jump in between wagons. If they're lucky, they make it across unnoticed. Some said they plan to get off before the border and continue on foot. Often, they are arrested by Macedonian guards and sent back to Greece. No one can say how many have made it. A Greek government spokesman was not immediately available for comment.

More than a million refugees and migrants arrived in Europe in 2015, landing in Greece from Turkey and then streaming through the Balkans, heading north to Germany or Austria. But that route shut in March last year following an agreement between the EU and Turkey, stranding about 60,000 people in makeshift and formal camps across Greece.

Migrants ride railroads to seek better future Show all 10 1 /10 Migrants ride railroads to seek better future Migrants ride railroads to seek better future Habib, 22, from Algeria with his friends on an abandoned railway wagon. They boarded a freight train in an effort to cross the Greek-Macedonian border without documents. They were arrested in Macedonia and returned back to Greece Reuters Migrants ride railroads to seek better future A migrant jumps on a freight train in an effort to cross the Greek-Macedonian border in the northern city of Thessaloniki, Greece Reuters Migrants ride railroads to seek better future An Algerian migrant has a picture of fellow migrants in Macedonia. According to the migrant, his mobile phone was broken by Macedonian police when he was arrested and returned to Greece Reuters Migrants ride railroads to seek better future Algerian migrants are seen on a freight train before its departure in the northern city of Thessaloniki Reuters Migrants ride railroads to seek better future Anise, 21, an English teacher from Algeria, rests in an abandoned railway wagon used as a shelter by stranded migrants in Thessaloniki Reuters Migrants ride railroads to seek better future Algerian migrants lay on the railway tracks as they wait for a freight train to depart Reuters Migrants ride railroads to seek better future An Algerian holds up his injured hand. He was injured in his effort to jump on a freight train Reuters Migrants ride railroads to seek better future Migrants walk between railway wagons in the northern city of Thessaloniki Reuters Migrants ride railroads to seek better future An Algerian smoking inside an abandoned railway wagon used as a shelter by stranded migrants Reuters Migrants ride railroads to seek better future A migrant with his belongings waiting for a freight train to depart Reuters

In the abandoned trains where Khaleuf and others live, conditions are grim, without electricity or running water. For food, they queue up at a nearby camp in a former toilet paper factory. People come and go, leaving piles of garbage behind. Some carriages burned down in accidents when migrants tried to warm up in freezing winter temperatures. “Here we live like animals,” said Habib, a 22-year-old Algerian who crossed from Turkey to the island of Rhodes and then hid under a truck on a ferry to Athens.

Together with a friend, he had made an attempt to leave Greece days earlier, leaping on to a train with his blue rucksack. Without documents, the pair were arrested in Macedonia and sent back. Despite the dire conditions, many migrants choose the carriages over the camps as they can keep an eye on passing trains, they said.

Mustafa, a 32-year-old Algerian who arrived in Greece last October and in Thessaloniki in March, hoped to get out of there soon. “Tomorrow I hope to be in Macedonia!” he said.