Turkey says its troops have withdrawn from northern Iraq after a week-long offensive against Kurdish PKK rebels.
In a statement on its website, Turkey's military said it had achieved its goals, and there was no question of any foreign influence on the decision.
Iraq and the US had urged Turkey to end its incursion across the border, amid fears of escalating regional tensions.
After the pullout, Turkish PM Recep Tayyip Erdogan urged the PKK rebels to lay down their arms.
"One cannot reach anywhere by the way of terror. Give up this wrong path... without causing more pain to your mothers and fathers," he said in a televised address.
"Our democracy is mature enough to embrace all kinds of differences."
Ankara says its military offensive 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 PKK guerrillas - who are fighting for a Kurdish homeland in south-eastern Turkey - from using the area as a safe haven.
The Associated Press news agency reports that at least 200 lorries carrying Turkish troops have now left the Iraqi border area.
It was the first substantial land incursion since the Turkish parliament authorised cross-border operations against the PKK last year.
In its 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.
"Both the start and end dates of the operation were decided by us solely based on military reasoning and necessities," it said.
"Any influence, either foreign on domestic, on this decision by the Turkish armed forces is out of the question."
It added: "Terrorist activities in Iraq's north will be observed in the future, and no threat against Turkey from this region will be allowed.
"The struggle against terrorism will be pursued with determination at home and abroad."
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 comes 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.
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."
Iraq said the incursion was unacceptable and violated its sovereignty.
Iraqi Foreign Minister Hoshiyar Zebari welcomed the withdrawal.
"We think this is the right thing for Turkey to do," Mr Zebari told reporters.
AP quoted Mr Zebari as saying that the US had played an "instrumental" role in pressing Turkey to leave.
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.
She adds that the remoteness of the region involved means it may be difficult to get any accurate independent assessment of its effectiveness of the incursion.
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 - the Kurdistan Workers' Party - is branded a terrorist organisation by Turkey, the US and EU.
Analysts say Turkey felt it had to mount a show of strength after a wave of devastating PKK ambushes on Turkish troops in September and October last year.
Turkey's campaign began with air strikes in December, supported by intelligence from the US.
More than 30,000 people have been killed since the PKK began its armed campaign in 1984.