Tempers flared and scuffles broke out as the Tunisian army and aid groups struggled Sunday to control the chaos of thousands of migrant workers streaming across the border from Libya.

Lugging mattresses, blankets, overstuffed duffel bags and pulling suitcases on wheels, the expatriate laborers jostled one another for position in long lines, waiting to be processed.

"If you have registered move to the side!" screamed a Tunisian army official, waving his arms and blowing a whistle at a group of exhausted and confused-looking Egyptian day laborers.

At least 10,000 migrant workers, mostly Egyptians but also from China, Thailand, Morocco, Turkey and elsewhere, massed at this Tunisian border town, where tent camps have been erected by the army to house the stranded laborers.

They joined thousands of others, some of whom have been stuck here for days after fleeing the unrest in Libya.

"We slept here in the cold, on the asphalt," said Mustafa Shaheen, an Egyptian who arrived early Saturday from the Libyan town of Zuara about 30 miles (50 kilometers) to the east.

He was surrounded by hundreds of Egyptian men sitting on blankets alongside the road, their baggage piled up around them as they waited for instructions.

But their patience was wearing thin as they watched workers of other nationalities being ferried away by their governments or on company buses.

These included a group of about 1,000 Chinese railway workers, still suited in their bright blue overalls as they munched on baguettes provided by Tunisian volunteers. Smiling and relaxed, they chatted or played cards as they waited to board buses sent in to evacuate them.

"Every day, the aid organizers say the Egyptian government is sending a boat to come get us. They've been saying that for four days," complained 30-year-old Khalaf Ahmed.

Journalists were among those targeted by the frustrated Egyptian migrants, who screamed at and shoved cameramen to try to prevent them from filming the border chaos, saying they were trying to protect their fellow workers still stuck inside Libya.

"The Libyan army scares us at the checkpoints and says, 'You are making Libya look bad when you cross that border and that will affect the rest of the Egyptians inside,'" Ahmed said.

The International Organization for Migration estimates that at least 335,000 Egyptian laborers work in Libya. A total of 50,000 people have crossed the border here since Feb. 21, including 20,000 over the weekend, according to the European Commission's Humanitarian Aid Office.

Not all the migrants are documented. Some Egyptians told the Associated Press their Libyan employers kept their passports and didn't return the documents before fleeing Libya themselves.

At a refugee camp set up by the Tunisian military, Egyptian migrants blocked off the road and shouted slogans against their government, saying their plight was being ignored. "Where is the Egyptian government?" they chanted.

"We want to leave here so that we can make room for other Egyptians coming through," said Ibrahim Mamdouh, who has been stuck at the border for three days. "We want our voices to reach (Egyptian foreign minister Ahmed) Aboul Gheit."

"What worries people is that they arrive at the camps and see that people who arrived two days ago are still there," said Heinke Veit, a European Union spokeswoman.

She said that while the Tunisian authorities were to be commended for their organization and aid, their capacity was being stretched.

At the border towns of Zarzis and Jerba, hundreds of Egyptians have been camped out in classrooms and in a local gymnasium, some for days.

At a school in Zarzis, where mattresses covered the floor of a classroom, men whiled away the hours lounging on floral quilts and leaning against a wall hung with a map and a chalk board. Some wore knitted caps and layers of clothing against the chill air.

"We have humble things to offer and need the government in Tunis to pressure Egypt to take action," said Gharida ben Hmeida, a local aid volunteer.