* Prime minister spoke to Gaddafi over foreigners' safety
* Turkish ferries reach Benghazi to pick up stranded Turks
* Turkey has projects in Libya worth more than $15 billion
(Adds quotes, details on ferryboats)
By Daren Butler
ISTANBUL, Feb 22 Turkish Prime Minister Tayyip Erdogan warned Muammar Gaddafi's government on Tuesday against taking "cruel steps" to crush an uprising, as thousand of Turks stranded in Libya waited to board ships sent to bring them home.
Some 2,600 Turkish workers in the eastern Libyan city of Benghazi were assembled at the port to board two ferryboats that arrived late on Tuesday to rescue them from the violence engulfing the North African country.
"I would like to remind both officials and government opponents in Libya to be extremely careful to ensure the security of foreigners in their country," Erdogan told members of his ruling AK Party in parliament.
Officials say there are 25,000 Turks in Libya, many of whom work for construction firms.
Gaddafi has vowed defiance in the face of mounting revolt. At least 233 people have been killed in the violence so far. [ID:nL3E7DM0K1]
"Taking cruel steps against people voicing their democratic demands will only exacerbate the spiral of violence and threaten the country's unity," Erdogan said. He added that he had spoken twice with Gaddafi.
Turning more broadly to the upheaval seen across North Africa and the Middle East, Erdogan gave a stark warning.
"No government that turns to violence against their people, takes no notice of their demands and remains insensitive to their expectations and sees its people as a threat can stay long in power," said Erdogan, regarded as one of the most popular leaders in the Muslim world.
BREAD AND BLANKETS
Foreign Minister Ahmet Davutoglu said there were nearly 5,000 Turks in the Benghazi area.
Thousands took refuge in a soccer stadium overnight, then were taken by bus to the port where the first two of five ships sent from Turkey arrived.
Some 3,000 people were preparing to board two Turkish ferryboats that had docked at Benghazi, Anatolian news agency said. The two ships will take their passengers to the Turkish town of Marmaris on the Mediterranean, it said.
During their stay at the Benghazi stadium, the Turks reported hearing shooting and explosions, along with the sound of funeral prayers, while outside on the streets youths were seen brandishing Kalashnikov rifles.
People gave them blankets and bread and they were not treated badly, but nevertheless some of the Turks fell ill, said Burcu Begde, an employee of a construction firm building a university in Benghazi, who had just returned to Turkey but was in touch with co-workers left behind.
Some Turks managed to catch a flight home from Benghazi on Sunday night, before violence spread to the airport. There were reports that the runways have since been destroyed.
Turkey's navy has sent a transport ship, with room for 1,500 passengers, escorted by two frigates and a refuelling ship, and stocked with food for 6,000 people, Erdogan's office said.
Another ship was being sent to Libya on Tuesday afternoon and a fifth vessel was being prepared for departure on Wednesday. Each of these ships can carry 800 passengers. A convoy of buses also took more people out by road to Egypt.
Two of three flights scheduled to arrive in Istanbul from the Libyan capital Tripoli and Egypt's coastal town of Alexandria had landed by 2100 GMT, NTV news channel reported. About 1,500 Turks have so far been evacuated by plane.
Adil Yasar, who arrived from Tripoli, told Anatolian he and fellow evacuees had gone without food and water at the airport for two days.
"The time at the airport turned into a nightmare, fights began to break out. Everyone is frantic," Yasar said.
Turkey has made forging closer diplomatic and economic ties with the Middle East and the Arab world a priority, banking on prosperity eventually bringing stability to the volatile region.
Turkish companies, mostly construction firms, have projects worth more than $15 billion in Libya and trade volume between them was about $2.4 billion last year.