Navid Mohammedi, 21, left, Mohsen Amiri, 35, and Javed Hakimi, 57, were all recently deported from Germany after being rejected for asylum. (Pamela Constable/The Washington Post)

Three men slumped on their cots in a clean but cramped dormitory room. They looked glum and shellshocked, as if they had suddenly found themselves in a forbidding foreign place. 

In many ways, they had. 

Javed Hakimi, Mohsen Amiri and Navid Mohammedi were among 45 unhappy passengers who arrived here under guard on a charter flight from Frankfurt this month. It was the first of many such flights that are expected to return thousands of Afghan asylum seekers from Germany under a European Union agreement with President Ashraf Ghani. 

Across Western Europe, as many as 80,000 Afghans eventually may be repatriated after their asylum applications are rejected, under the agreement signed by Ghani and E.U. officials in October.

After the flight from Frankfurt landed, some of the passengers headed for buses home. But these three had no one waiting for them. They said that their immediate families live in Germany, and that once their 10-day stay at a government rest house ended, they would have nowhere to go.

“I am completely alone here,” said Amiri, 35, who added that he survived a capsizing off Greece in 2012 while trying to reach his mother and siblings in Germany. “I was a law-abiding person there, and I was training to be a house painter, but they rejected my asylum case and said I had to go home. This is not my home. I don’t even know where to start looking.”

To German officials, these were the easiest foreigners to legally remove amid a chaotic surge of refugees from Syria, Iraq and other countries that has overwhelmed many  nations and generated an angry backlash across Europe. All the Afghans had arrived illegally, some had committed crimes in Germany, and none were found to qualify for political asylum.

To Afghan officials, these men will become a burden that the poor, insurgent-plagued country cannot afford. Hundreds of thousands of longtime war refugees are pouring back from next-door Pakistan; large numbers of rural families have been displaced by the Taliban and are living in camps. 

“This is a real crisis for us,” said Rohullah Hashimi, an official at the Afghan ministry responsible for refugees. “We pleaded with the Europeans to only send those who wanted to come voluntarily, but there was a lot of pressure for us to take back more.” Many Afghans sold everything before they left their country, and they have returned penniless. With no prospects, he said, they may try to reach Europe again or even join the insurgents.

Hakimi, 57, spent more than 20 years in Germany, where he married and raised two daughters, but his criminal record made him a high priority for the new return policy. He was once convicted of drug dealing there and was imprisoned for two years, then deported to Afghanistan. 

Last year, he sneaked back, paying smugglers to guide him across a half dozen countries. He was working in his brother’s restaurant in Hamburg this month when he received a notice to report to the police. His lawyer said it was probably a routine matter. Instead he learned he was about to be put on a plane.

“Yes, they accused me of selling drugs, but I served my time in prison, and I wanted to be with my family again,” Hakimi said. He said one man slated for the same flight had killed someone but was allowed to stay at the last minute after a church said he had converted to Christianity and repented.

Mohammedi, 21, has even fewer ties to Afghanistan, having grown up in Iran, where his family had fled to escape civil war. He said they faced harassment there and encouraged him to go to Germany to live with an uncle. In 2011, at age 16, he made the hazardous journey across mountain forests and open water, winding up at a train station in Paris late at night. 

“I bought a ticket to Frankfurt and was so exhausted I fell asleep on the train,” Mohammedi said. “A policeman woke me up and asked where I was from. I told him Afghanistan, and he said to me in Dari, ‘Don’t worry. You’re safe now. You’re in Germany.’ ”

As a minor, Mohammedi said, he was sent to school and given a multiyear visa. But several weeks ago, he said, he was suddenly informed that his asylum claim had been rejected and was asked whether he wanted to go home. “Three times I told them no, but they sent me anyway,” he said. His family is still in Iran.

Until recently, Germany was sending back only Afghans who would leave voluntarily, but after being flooded with nearly 900,000 migrants in 2015, the government decided to speed asylum processing for those fleeing civil wars, such as Syrians, and step up the deportation of others less likely to win asylum cases, including many Afghans. 

This year, Germany has deported a record 23,750 asylum seekers. More than 200,000 foreigners have pending deportation orders, including 12,500 Afghans.

Under the E.U. agreement with Kabul, German officials said they will focus on individuals with criminal records and recent illegal entries, and avoid returning those from unsafe regions of Afghanistan. But the policy has aroused anger among Afghan expatriates, who protested at the Frankfurt airport when the first plane departed.

Afghan officials said they had little to offer the new arrivals except food and shelter for a few days, subsidized by the nonprofit International Organization for Migration, which is also providing those without homes a one-time payment of about $600. 

“It’s not much to start a new life,” said Hashimi, the government official. “We can offer them some guidance and positive morale, but anything else is beyond our capacity.”

Amiri, who was happily reunited with his family in Germany four years ago, seemed the most undone by his abrupt deportation. He recounted in vivid detail his harrowing journey from Afghanistan, when an overloaded smuggler’s boat from Turkey capsized near the shores of Greece.

“It was the middle of the night. The boat was too crowded and the water was very turbulent. We all started swimming, and I finally reached the banks, but five people drowned, including three children,” he said. “It was May 20, 2012. The date is engraved in my mind.”

The German government was welcoming at the time, Amiri said, but when he was being deported, it was a different story. “The police searched me many times and took all my money at the airport,” he said. “On the plane, there were more police than passengers, and they treated us like terrorists, even following us to the bathroom.”

After this first flight, Afghan officials said, the deportations were halted for the Christmas season. The second group will arrive in January.