Turkey's military said Friday it has ended a ground offensive against Kurdish rebels in Iraq, but said that foreign influence did not play a role in its decision.

At least 200 trucks carrying Turkish troops were seen leaving the Iraqi border area and heading into Turkey's interior.

The move came a day after Defense Secretary Robert Gates told Turkish leaders during a visit in Ankara that they should end the offensive as soon as possible. In Washington, President Bush made a similar point Thursday, saying Turkey needed to move quickly and get out.

"Both the start and end dates of the operation were decided by us solely based on military reasoning and necessities," the military said in a statement. "Any influence, either foreign on domestic, on this decision by the Turkish Armed Forces is out of question."

Turkey launched the incursion into northern Iraq more than a week ago against the Kurdistan Workers' Party, or PKK, a group fighting for the autonomy of predominantly Kurdish southeastern Turkey. The rebels have carried out attacks in Turkey from bases in Kurdish Iraq.

It was the first major, confirmed incursion in Iraq by Turkey in almost a decade.

In Washington, National Security Council spokesman Gordon Johndroe said Friday that "it was a targeted and relatively short operation."

"But I would certainly expect that in the future, that unless the PKK gives up terrorism, that we're going to have to continue to work with the Turks and the Iraqis to go after them," Johndroe said.

Iraqi authorities have said they do not support the PKK but objected to Turkey's military action. On Friday, Iraq's foreign minister said he welcomed the troops' departure.

"The timing is good. I think the military carried out its promises" to remove Turkish troops after finishing the operations, Hoshyar Zebari told The Associated Press in a telephone interview.

Zebari credited the U.S. with playing an "instrumental" role in pressing Turkey to leave.

"The U.S. played a very important role on all fronts to remind Turkey of the seriousness of the situation," Zebari said.

The Turkish military said in a statement that the operation targeted some 300 rebels in Iraq's Zap region, and 240 of them were killed. Turkish losses stood at 27.

"Without a doubt, it is impossible to render the entire terrorist organization ineffective with an operation in only one region. However, it is shown to the group that Iraq's north is not a safe area for terrorists," the military said.

The military said it would not allow northern Iraq to be used as a springboard for attacks against Turkey.

"Terrorist activities in Iraq's north will be observed in the future and no threat against Turkey from this region will be allowed," the military said.

At least 200 military and civilian trucks ferried Turkish troops from the border with Iraq and through the Turkish town of Cukurca on Friday, bound for barracks in Turkey's interior. Some soldiers in the trucks gave thumbs-up signs as they returned. Some had camouflage paint on their faces and held machine guns.

PKK spokesman Ahmad Danas confirmed Turkey's withdrawal, and speculated that American pressure had forced Turkey to pull out.

The PKK took up arms against Turkey in 1984. The fighting has killed up to 40,000 people.