ANKARA, Turkey – Foreigners fled the chaos in Libya by the thousands, with Americans and Turks climbing aboard ships, Europeans boarding evacuation flights and North Africans racing to border crossings in overcrowded vans.

Two Turkish ships whisked 3,000 citizens away from the unrest engulfing Libya as Turkey cranked up its largest-ever evacuation, seeking to protect an estimated 25,000 Turkish workers in Libya. More than 200 Turkish companies are involved in construction projects in Libya worth over $15 billion, and some construction sites have come under attack by protesters.

The safety of U.S. citizens was a prime concern after failed attempts earlier this week to get them out by plane. But hundreds of Americans safely boarded a 600-passenger ferry at Tripoli's As-shahab port on Wednesday for the five-hour journey to Malta, a Mediterranean island south of Italy.

Over a dozen countries — including Russia, China, Germany and Ukraine — sent planes in to help their citizens escape an increasingly unstable situation.

Tripoli airport was chaotic and overflowing with stranded passengers, said Carlos Dominguez, who flew from the Libyan capital to Madrid. He said people could not buy tickets online and Libyan Airlines was accepting only cash.

"The doors are locked and you can only get in if you have a ticket," he said.

Swarms of Egyptians who had lived in Libya were locked outside the airport, he said, "lying on the sidewalks with blankets and children" and all their belongings, even television sets.

"The army treats them very badly," he added.

Passengers arriving in Rome and Malta also described scenes of chaos and violence at Tripoli's airport, with people pushing and shoving to get onto the few flights taking off Wednesday and Libyan police and security agents kicking and beating them.

"One of my fellow passengers was actually beaten up quite heavily and kicked on," said Steffan Arnersten, a 42-year-old Swede who works as a managing director at a technical consulting company. "He's quite wounded."

Sharon, a Maltese arriving home aboard the only one of three scheduled Air Malta flights to make it out Wednesday, said the situation at the airport was desperate.

"It was just terrible. People fighting for their lives, scrambling over people, pushing, shoving, kicking, everything. It was a mess."

Irina Kuneva of Bulgaria said tensions in Tripoli were rising sharply after strongman Moammar Gadhafi's defiant speech hinting at civil war with protesters in eastern Libya.

"He said people should either do what he tells them or there will be a civil war," she told reporters Wednesday as she arrived in Sofia on an evacuation flight. "People are very scared."

Two Turkish ships left the eastern Libyan port of Benghazi on Wednesday escorted by a navy frigate, heading to Turkey's Mediterranean port of Marmaris, where a soup kitchen and a field hospital were set up and buses were brought in to transfer evacuees. Turkey also sent two more ships to Libya and flew 250 more Turkish citizens back home.

Passengers cheered and whistled as the two ferries carrying 3,000 Turks docked at Marmaris early Thursday. Exhausted but relieved the passengers hauled suitcases and large carrier bags off the Orhan Gazi-1 ferry, the first to arrive.

The passengers are mostly construction workers employed by more than 200 Turkish companies involved in construction projects in Libya, worth more than $15 billion. Some 30 foreign nationals were also on board. Turkey began evacuating some 25,000 Turks after several construction sites the east of the country were raided and looted during protests last week.

Among the construction workers who saw violence first hand was Mustafa Oztekin, who worked in the hard hit Eastern city of Benghazi. "Our construction site was pillaged, our camp was looted," Oztekin told The Associated Press. "We left for the airport thinking that it would be safe but the protesters raided the airport as well."

"We were terrified but they quickly reassured us that they had nothing against the Turks. They were just against the regime," he said. "In fact, it was the protesters who accompanied us to a stadium, where we waited for two days to be evacuated."