SAHELA, Iraq -- Some were moved by fears that the violence in Syria would soon find them, as rumors of beheadings by Islamist militants circulated from one village to another.
"They are killing Kurds there, Jabhet al-Nusra, Qaeda," said Amjad Sulaiman, 22, referring to the Nusra Front and other jihadi groups fighting in Syria and terrorizing local communities.
Many others, beckoned by images of a better life broadcast from television stations based here in northern Iraq, came in search of jobs or electricity, even just a cold drink of water.
"There is no bread," said one young man.
"There is no water," said another.
Traversing a meandering pathway across Syria's eastern frontier to a makeshift camp on a desert hilltop here, tens of thousands of Syrian Kurds have fled to northern Iraq in recent days, one of the largest movements of refugees since the conflict in Syria began more than two years ago, according to the United Nations.
Just as rapidly, a refugee economy has sprouted: money changers, cigarette vendors, boys selling cellphone credits. Men riding donkeys met families along the path and, for a fee of about $5, carried their things the rest of the way. The journeys perpetuate a history of exodus and oppression for Kurds, a community whose ambitions for statehood have been thwarted for decades by Middle Eastern governments and their Western benefactors.
Amid the scenes of displacement and hardship, however, as hordes of refugees mobbed trucks bulging with watermelons and foam mattresses, was the incongruity of the hardening sense that emerging from the civil war in Syria was a better future for the region's Kurds.
As perilous as the exodus was, for many refugees it carried a measure of hope, bringing them not to the unwelcoming places other Syrians have found themselves but into friendly arms. As grim as the conditions are for the newly arrived refugees, some of whom spent their first night sleeping outdoors on a thin carpet, a sense of shared identity prevailed for many who have long lived under a government in Syria that refused them citizenship and prohibited them from even speaking their language.
"We have been living in fear," said Salah Ali, 68, who arrived several days ago and is living in a new tent city on the outskirts of Erbil, the capital of Iraq's Kurdistan region. "Here, we finally feel relief. We have food. We are safe. We haven't slept well until we got here."
The influx here stands in sharp contrast to the humanitarian crisis unfolding in Jordan, Turkey and Lebanon, where hundreds of thousands of Syrians have sought shelter. In many areas, the flood of refugees has raised sectarian and ethnic tensions and presented a dire challenge that governments are struggling to meet. Here, refugees are welcomed, even encouraged.
"It's kind of the family looking after each other," said Mike Seawright, a field coordinator for Doctors Without Borders, whose medical workers treated arriving Syrians for an assortment of ailments like dehydration and diarrhea but not war wounds.
"To generalize, people here are in pretty good condition," Mr. Seawright said.
Local authorities and aid agencies said they were unprepared for the latest wave of refugees, and that an existing camp nearby in northern Iraq was terribly overcrowded, housing nearly 50,000 refugees in a site built for 22,000. Since last week, nearly 40,000 more Syrian Kurds have come to the area, bringing the total close to 200,000. The authorities have scrambled to provide for the latest influx, calling on residents across the region to make donations.
When Massoud Barzani, the president of Iraq's Kurdish territory, whose security and prosperity has served as a model for the aspirations of Kurds in Syria, Turkey and Iran, visited a new refugee camp on Monday, he was greeted like a revered spiritual leader, his vehicle mobbed as he appeared through a sunroof.
"We are brothers to you," Mr. Barzani told the crowd. "And you are now in your home and in your country."
Mr. Barzani has lately sought to position himself as not just the leader of Iraq's Kurds, but someone who can unite all Kurds as they push for more independence and more democratic rights. He recently threatened to send his own security forces, known as peshmerga, to defend Kurds in Syria. Next month he will host a regional Kurdish conference that is viewed as a setting to discuss how the Kurds can seize the turmoil gripping the Middle East to advance a shared agenda, the distant goal of which remains an independent Kurdish state.
While the flood of refugees has tested Mr. Barzani's administration, it has also presented him with a political opportunity. By caring for refugees and, in his call to arms for a people long steeped in a martial culture, he is burnishing his credentials among Syrian Kurds as a regional leader. As some refugees crossed the border Wednesday morning they approached a journalist with a video camera and chanted, "Viva Barzani!"
"God bless Barzani," said Mariam Ahmed, 30, a refugee at the camp near Erbil. "We have everything we need here."
Muhammad Murat, 43, a welder, fled here after hearing stories of nearby villagers being executed by jihadi fighters. "Our only hope to go back home is for Barzani to send the pesh to fight," he said, referring to the peshmerga. "That is the only thing that gives us hope."
At the beginning of the civil war in Syria, now in its third year, Kurds had hoped to stay out of the fight. For a while, Kurdish areas of northeastern Syria were relatively safe. But lately, clashes have intensified between Kurdish militias and Arab jihadis, who see Kurdish claims to autonomy and territory as a challenge to their goal of establishing an Islamic state.
That new fighting, as well as what locals describe as a campaign by jihadis to destroy agriculture and cut power and water supplies, has hardened longstanding tensions between Kurds and Arabs, which were on display here as aid workers and local officials registered refugees.
Around midday on Wednesday at the hilltop camp where new arrivals were given water and food, a man with bullhorn tried to segregate the small number of Arabs who had arrived from the Kurds.
"All the Arab people in the tents, come out here," he said. "You have to go here and be on a separate list."
Standing nearby, Erdogan Kalkan, a protection officer for the United Nations High Commissioner for Refugees, was troubled.
"We would never accept this," Mr. Kalkan said. But, he added, "they have security concerns, national security concerns."
The episode highlighted what many Syrian Kurds say has become another casualty of their war: any hope for a multiethnic society, with Kurds and Arabs living together peacefully.
"There is no hope for that," said Mr. Ali, sitting in his tent while his grandchildren played with marbles. "Everyone hates one another and wants revenge."
For the refugees who arrived here in recent days, the things they brought reflected the haste of their departure. For many, that meant a single bag of clothes, packed in a duffel bag or canvas sack. Some, if they had the time and presence of mind, brought small items to remind them of homebound comforts: a favorite teddy bear or a wedding album. One woman brought a small satchel of soil from her garden, another a miniature Koran; one young boy came with four pet birds. A young woman said she had brought only her remembrances.
"I brought my memories of a beautiful and peaceful Syria," she said.
Yasir Ghazi and an employee of The New York Times contributed reporting.
This article originally appeared in The New York Times.