Turkey's prime minister has called on Kurdish PKK rebels to lay down their arms and embrace democracy.
Recep Tayyip Erdogan's comments came within hours of an announcement that Turkish forces had returned from an offensive against rebels in north Iraq.
"One cannot reach anywhere by the way of terror," he said in a TV address. "Our democracy is mature enough to embrace all kinds of differences."
Turkey's military said it had achieved its goals in the week-long offensive.
Iraq and the US had urged Ankara to end its incursion across the border, but the military said there was no question of any foreign influence on the decision.
Friday morning saw dozens of vehicles full of soldiers crossing into the Turkish border town of Cukurca, while empty vehicles drove up mountain roads in the opposition direction to pick up more troops.
Turkey said its offensive had targeted bases used by up to 3,000 Kurdish rebels as a spring-board for attacks across the border.
It accuses Iraq of failing to stop guerrillas of the Kurdistan Workers' Party (PKK) - who are fighting for a Kurdish homeland in south-eastern Turkey - from using the area as a safe haven.
In a statement, the Turkish military said at least 240 PKK militants had been killed since it launched its offensive just over a week ago. It added that 27 members of the Turkish security forces had also died.
The PKK has disputed Turkey's figures, and independent confirmation of the toll in the remote area is virtually impossible.
The BBC's Sarah Rainsford in Istanbul says the military impact of the operation is unlikely to be clear until the spring, when the mountain snow melts and the PKK traditionally launches renewed attacks.
In his address, Mr Erdogan spoke directly to the rebels.
"Give up this wrong path... without causing more pain to your mothers and fathers," he said.
He also appealed to Baghdad to help uproot the PKK from northern Iraq.
"We should not allow (the PKK)... to poison our ties," he said.
"Turkey and Iraq must work together to get rid of this problem - there is no other way."
There had been fears that a lengthy incursion could lead to clashes with the Iraqi Kurds, who have virtual autonomy in northern Iraq, and jeopardise the stability of the country's most peaceful region.
The withdrawal came a day after US President George W Bush urged Turkey, a Nato ally, to wind up the incursion and get out of Iraq. US Defence Secretary Robert Gates personally conveyed the message during talks in Ankara on Thursday.
Following the withdrawal, White House spokesman Gordon Johndroe described Turkey's incursion as "targeted and relatively short".
He added: "There is one thing that remains clear, and that is the United States, Turkey, and Iraq all will continue to view the PKK as a terrorist organisation that needs to be dealt with."
The Iraqi authorities, while stressing they did not support the PKK, objected to Turkey's military incursion, saying it violated their sovereignty.
Iraqi President Jalal Talabani, himself a Kurd, welcomed the end of the incursion.
"This withdrawal indicates the credibility of the Turkish government's statements that the military operation is limited and temporary," his office said in a statement.
The PKK in northern Iraq claimed victory over the Turkish military.
"Because of the fierce battles between the PKK and the Turkish forces, the Turkish forces have withdrawn," said Ahmed Danees, the group's foreign relations spokesman.
BBC regional analyst Pam O'Toole says the Baghdad government and Iraq's Western allies will be relieved this operation was completed in a relatively short time, and with no confrontations between Turkish soldiers and Iraqi Kurdish forces.
But she also says this offensive has set a precedent, showing Ankara is willing to carry out its repeated threats to conduct land operations against the PKK in northern Iraq.
The PKK is branded a terrorist organisation by Turkey, the US and EU.
More than 30,000 people have been killed since the PKK began its armed campaign in 1984.