It was supposed to be the first step on their journey to Western Europe. But now thousands of migrants are mired in despair, anger and frustration on the scenic Greek island of Lesbos.

After perilous sea voyages from neighboring Turkey, they have been stranded here for days, some for nearly two weeks, running out of money and desperate to get to mainland Greece and continue their route.

The island of some 100,000 residents has been transformed by the sudden new population of some 20,000 refugees and migrants, mostly from Syria, Iraq and Afghanistan — and the strain is pushing everyone to the limit.

Fights break out among the migrants as they wait in long lines for hours in the summer heat and humidity, after days without showers. Families, sleeping on the streets, wander the seaside promenade of Mytilene, Lesbos' capital, asking at the swanky cafes and restaurants to use their bathrooms or charge phones. The small police force, overwhelmed by the numbers, charges in at any sign of trouble, beating crowds with batons to break them up.

"We escaped from ruin to be met with more ruin here," said Mohammed Salama, a 45-year-old Syrian. He fled the Damascus suburbs where fighting has raged for years, seeking a refuge so he can bring his four daughters and pregnant wife who remained behind.

"I did not come here to make money. I came here so I can later bring my children and have them live in safety," he said Sunday.

Lesbos is one of several Greek islands hugging the Turkish coast that are the first stop for many of those trying to reach Western Europe. Here, they must register with police and receive an official document. Without that document, they can't buy a ferry ticket to the mainland to continue on land through the Balkans.

But the registration offices are swamped, slowing everything down. Under the punishing sun in high humidity, hundreds crowd outside the offices for hours. Brawls break out frequently among the hot, exhausted crowds, often met by police swinging batons and shouting, "Pisso!" — Greek for "go away."

The nerves of Lesbos residents as well are fraying.

"I want them out of here, but it's not because I hate them. It's because we see so much suffering and we are unable to help them in any meaningful way," said Pandelis, a resident who wanted to be identified only by his first name.

The signs of residents' impatience come in many ways. Drivers blast their horns in fury at migrants walking in the middle of the streets by Mytilene's port. Some passers-by roll their eyes disapprovingly. Many put on surgical masks when they pass through the area, convinced the new arrivals are bringing disease. On Saturday, two elderly men walked among the overwhelmingly Muslim migrants handing out copies of the Bible in Arabic.

Others complain about the litter — bottles, plastic bags and cardboard thrown into the sea and covering the streets around the port.

"Why, man? Why?" one municipality worker, pointing to bottles in the sea, yelled at some young Iraqis sitting by the water throwing bread to fish.

There are also acts of courtesy and kindness. Sitting outside a hotel having a morning coffee, a Greek woman in her 60s was met by an endless stream of passing Syrians, Iraqis and Afghans asking her questions — Where was a pharmacy? Where do they sell phone cards? She patiently answered every one.

Some restaurants let in women and children to use their bathrooms. Policemen sometimes help the elderly, offering them seats, and when there are no tensions, they quietly answer the migrants' countless questions about their fate.

Among the refugees and migrants, confusion reigns. Lines suddenly form and people rush to join them and wait for hours, only to discover the line was sparked by a rumor and they were waiting for nothing.

On Saturday, a crowd converged on one of the prefab caravans that serve as registration offices by the port. Impatient Afghans jumped on the roof, pounding it, and it turned into a fight between them and Syrians in the line, until police rushed in. It turned out the caravan was empty.

"I admit, we may not be organized, but the police don't have to hit us so hard," complained Khaled Ghazal, a Syrian travelling with a 10-year-old son suffering from a blood disease. Maysa Mustafa, a Syrian environmentalist, showed bruises on her shoulder she said were from police beatings. Another Syrian, Ahmed Tawil, had a black eye.

The national, class and sectarian divisions show. Most of the Afghans are impoverished men in their 20s, while the Syrians and Iraqis include families and the middle class — and they complain often about the Afghan youth pushing their way to the front of lines. It doesn't help that most of the Afghans are from their country's Shiite minority, a point several of the mainly Sunni Muslim Syrians, coming from a bloody war with sectarian overtones, bitterly mentioned.

On Sunday, about 300 people, mostly Afghans, demonstrated on the street outside the port, demanding to be allowed to go. "Atina, Atina!" they chanted, referring to the Greek capital Athens that they want to reach, until police swinging batons dispersed them.

The migrants' day begins at sunrise, as they converge on the registration offices, hopeful that today they will finish. But the day drags on with lines, scuffles, confusion — and exhaustion and despair set in. Many sit on the sidewalks stunned, silently staring at the sea. Infants cry constantly. Parents try to comfort children sobbing from thirst or hunger.

Two or three times a day, a ferry arrives, and those who have gotten their documents and bought tickets rush to the port. Each ferry carries about 2,000 people to the port of Piraeus near Athens.

In the evening, those still waiting search the streets for pieces of cardboard to sleep on. Camps have been set up outside Mytilene, but few want to use them because they want to stay near the port.

"I am not really equipped to handle this kind of hardship," said Baraah, a 40-year-old Syrian widow travelling with her three teenage children and her late husband's sister. She spoke on condition she be identified only by her first name to prevent problems for family back home.

A teacher with a degree in English, she fled the Syrian city of Aleppo, one of the war's worst battlegrounds. "In Aleppo I had a home with an air conditioner, a microwave and a good oven," she said. "I left all that so I could come here and the children could be safe."

Now Baraah — whose means "innocent" in Arabic — has been stuck in Lesbos for 10 days, her money running out, sleeping on the sidewalk by the port for her chance at the paper.

Sunday morning, she turned to a passing Syrian woman and asked, "How is the line?"

"God curse the line and the line's father," the woman snapped before rushing away.