Turkey's Prime Minister Recep Tayyip Erdogan has called for Libyan leader Col Muammar Gaddafi to step down "for the sake of the country's future".
Mr Erdogan said the Libyan leader had ignored the wishes of his people by using force against them.
Correspondents say it is a marked change in Turkish policy towards Libya, with Mr Erdogan previously having taken a more conciliatory approach.
Col Gaddafi's troops have been fighting rebel forces for several weeks.
Turkey has temporarily closed its Tripoli embassy and withdrawn its employees, although it is keeping an embassy open in rebel-held Benghazi.
Most other Western governments evacuated staff from the country when international forces began air strikes against Libya in March, under a UN mandate to protect civilians.
'Solidarity and unity'
In a speech, Mr Erdogan said Col Gaddafi had ignored calls for change in Libya and preferred "bloodshed" than listening to his people.
"One cannot establish future, liberty, stability, peace and justice on blood. Therefore we wish Libyan leader immediately pulls out from Libya and steps down for himself and for the future of the country," he said.
He also said Turkey would do all it could to ensure the people of Libya take the lead in establishing a more democratic system, and would talk to the anti-Gaddafi National Transitional Council.
"The people of Libya should determine their future in solidarity and unity, it is a priority for us. Hence, we will stay in touch with National Transitional Council to ensure that the elements in our road map can be carried out."
The BBC's Jonathan Head says that, with this statement, Turkey is for the first time in accord with its allies over Libya.
Our correspondent says the the government had avoided calling for Col Gaddafi to step down, and had tried, without success, to find a compromise between him and the opposition.
Popular anger over the suffering of civilians in the besieged Libyan city of Misrata has probably helped shift the Turkish government's policy, just a month before it faces a general election, our correspondent adds.
The UN withdrew all international staff from Tripoli earlier this week after staff were confronted by angry crowds protesting over the death of Col Gaddafi's son in a Nato air strike.
Meanwhile, there have been reports of fresh strikes by Nato on Misrata, where forces loyal to Col Gaddafi have been bombarding the port.