Like many other asylum seekers, Sherzad said he saw an open invitation when Germany and other European countries said they would take in refugees. Most important, Sherzad saw hope for his children’s future, one in which they would have everything that he missed in his youth after years of war in Afghanistan.

Since they left Kabul, the family’s trip has been a long and grueling one, taking them through Iran, Turkey and the Balkans. Many nights were spent on the streets, with the family huddled together trying to keep the youngest ones warm.

And it has been expensive. So far, Sherzad has spent $15,000 to get from Kabul to this town on the border between Serbia and Hungary, which they reached in mid-September. To reach his dream of resettling his children in Europe, Sherzad had to withdraw his life savings and sell his car and almost all their belongings.

“Come on, move along! Go to your mother,” he said, encouraging his son to keep walking along a road leading away from Hungary. They had spent the previous 16 hours waiting to see if Budapest would give an order to open the fence it recently built along the border and let the refugees pass through. The order never came, so Sherzad was searching for a bus that was supposed to come along this stretch of road to take refugees to the Serbia-Croatia border.

Up ahead, his two girls, ages 3 and 5, trailed his wife, who wore her hair wrapped up in a fashionable headscarf. Both parents carried small backpacks, which held all the family’s belongings with which to start a new life. Sherzad had a small fleece blanket folded and thrown over his shoulder and a plastic bag of food and water. His son carried a brightly colored Lego piece, which, to his father’s irritation, he kept dropping on the asphalt.

The conditions along the journey have been worse than he and his wife imagined. In Greece they slept outside on the sidewalk while they waited for paperwork to board a ferry to the mainland. The crossing through Macedonia was somewhat smoother, and aid stations had plenty of water, food and medical assistance for families with children.

They traveled through Serbia on a bus for nearly 12 hours with few problems, until they reached the closed border with Hungary. So they rerouted through Croatia to try their luck at the border with Slovenia, where they hoped to move on to Austria and then Germany.

In the two weeks since Sherzad and his family left Horgos, some 88,500 migrants have followed in their footsteps, making their way to Germany, Sweden and other European nations, where most will apply for asylum.

Today refugees avoid Horgos and go directly to the Serbia-Croatia border, where they wait out in hastily erected camps like the one in Opatovac, Croatia. Overwhelmed by the number of refugees arriving in Croatia, the government has said it could begin busing them to the border with Slovenia.

“This is really very difficult, but we are going to go as far as we can. We have no other choice,” Sherzad said.

On the migrant trail, Afghans naturally form groups, as do the other asylum seekers with a culture and language in common. By the time refugees reach Serbia, they have organized themselves into groups of 50 to 60, typically the people who have been sharing buses for hours on end. They offer one another moral and logistical support and often keep an informal headcount.

Some Afghan refugees complain that the Syrians get preferential treatment from European nations because there are so many of them and the Syrian civil war is so new.

“Europe has forgotten about the war in Afghanistan,” Sherzad said.

In Kabul, Afghans are watching the news of their countrymen making the difficult journey through Europe with both envy and worry, said Shakib Oraikhel, 24, who works on an international development project funded by the U.S.

He said young men see the dangers and problems Afghans have in Europe, but many would gladly confront the same challenges to get out of Afghanistan. His family and friends talk about fleeing to Europe every evening. In the last year, 15 to 20 of his friends have tried to leave by paying a smuggler to take them through Iran and then Turkey.

A close friend who made it to Iran watched as Iranian border police shot and killed seven members of his group. He and two others returned to Afghanistan, but he said he will try again as soon as he can come up with $1,300 to $1,700 to pay a smuggler.

“Everyone sees the news that Germany and other places in Europe are willing to take in refugees, so we are willing to try at any cost,” said Oraikhel via Skype from Kabul.

A few of his friends have secured visas to the U.S. through a special immigrant visa program available since 2012 for Afghans who worked for the U.S. government in some capacity and can prove they are being threatened by the Taliban. But the application process is extremely selective and can take months if not years.

This month Ghani made a public statement asking young Afghans not to leave the country. The Australian and Germany embassies in Afghanistan have run television ads and posters warning Afghans not to make the dangerous journeys across the Indian Ocean or the Mediterranean Sea.

Despite the efforts, there doesn’t seem to be any slowing in the number of refugees arriving in Greece each day, hundreds of them Afghans.

“I’ve applied to get a new international passport, just in case we decide to take this option,” Oraikhel said.