Now all they want is to reach neighboring Iraq.
They are among at least 160,000 Syrian Kurds that the United Nations says fled their homes following the start of a Turkish assault on northeastern Syria. His hometown of Ras al-Ain was one of the targets hit in Turkish air strikes.
The advance began shortly after U.S. President Donald Trump announced his forces were withdrawing from the area, giving Ankara more room to pursue its Syrian Kurdish militia enemies without the risk of clashing directly with the Americans.
Mohammed has been moving from town to town in the northeast, sleeping in schools packed with other displaced people. At one point he tried to rent a house before giving up and heading to the border with Iraq.
Some 5,000 have made it across the border in the past week, aid groups said on Monday. Many use smugglers paying up to $1,500 per family, some of those who made to camps on the Iraqi side of the border told Reuters last week.
But those lacking cash like Mohamed got stuck, sitting with a dozen other displaced people on the road next to the border checkpoint of Semalka. The Kurdish force controlling the area was only letting through the wounded, not families in general.
"Our house is gone. We tried to stay in schools in Tel Tamir but there is no space, while renting an apartment in Qamshibli cost 50,000 Iraqi dinars ($42 a month) which I don't have," the 40-year old said, standing next to his wife and two young children.
"Smugglers take $500 which I cannot pay," he said. "I'm ready to go anywhere, Europe, abroad. We don't have a place to stay here anymore."
"OUR FUTURE IS GONE"
Syrian Kurds on the Iraqi side have said passage was being made difficult by the YPG Kurdish militia, the main component of the Syrian Democratic Forces (SDF), which is still largely in control of areas in the northeast it has administered for years.
Authorities have kept the border crossing open for humanitarian shipments, trade, diplomats and journalists, but when the offensive started they stopped private trips to visit relatives on the other side of the border, said Kamiran Hassan, head of the local Kurdish immigration and passport department.
"We took the measure to avoid a crisis among travelers, to avoid the crossing getting too busy," he said, adding that the border would be reopened again for families at some point.
Mohamed and a dozen of other displaced people were ready to spend the night in the open next to their bags at the crossing, hoping they will be eventually allowed through to the semi-autonomous Kurdistan Region of Iraq (KRI).
Refugees there have been housed by authorities in the Bardarash refugee camp, originally set up in 2013 initially for Iraqis fleeing Islamic State.
"I have no idea where we will go. Our future is gone," said 24-year old Zainab Rassul, sitting next to her mother in the dust of an unpaved road next to the border crossing frequented by trucks.
"I'm in my final year of studies of Arabic language but I don't think I will be able to complete my studies," she said, almost crying.
Turkey views the YPG as a terrorist organization linked to Kurdish separatist insurgents at home.