ANKARA, Turkey (AP) _ Eleven Turkish special forces returned to northern Iraq Monday after their release by the U.S. military, ending a standoff that threatened relations between the NATO allies.

The 11 Turkish soldiers along with 13 Iraqi civilian staff and security guards went back to their office in the northern city of Sulaymaniyah by helicopter Monday, Turkey's military said.

U.S. troops from the 173rd Airborne took the Turkish forces into custody Friday in Sulaymaniyah over an alleged plot to harm Iraqi Kurdish civilian officials in the north. Turkey has denied any such plot.

The U.S. military had been holding a total of 24 people _ the 11 soldiers and the 13 Iraqi office staff members and security guards, Turkish officials said.

The detentions outraged Turkey, deepened the Turkish public's mistrust of the United States, and strained efforts to repair relations soured over the Iraq war.

Gen. Hilmi Ozkok, the chief of military staff, said the detentions ``created the biggest crisis of confidence'' ever between the Turkish and U.S. armed forces.

Turkish forces were blocked from doing their jobs, their equipment was destroyed and some (soldiers) were taken away,'' he said as he received U.S. Ambassador Robert Pearson for a farewell visit at the end of the American's assignment in Ankara.

Iraqi Kurdish fighters accompanied some 100 U.S. forces during the raid, Ozkok said.

A joint committee was expected to begin investigations of the detentions on Tuesday, Ozkok said.

``We are and will continue to be allies,'' Pearson said, adding he welcomed the investigation.

The Turkish soldiers were released in Baghdad on Sunday and spent the night at a guesthouse there before being flown to the north.

The releases came after telephone calls between Turkish and U.S. officials, including a half-hour talk between Prime Minister Recep Tayyip Erdogan and U.S. Vice President Dick Cheney.

``There is serious resentment among the Turkish people. If the detained soldiers are not released we won't be able to contain the resentment,'' the daily Hurriyet paper quoted Erdogan as saying.

Secretary of State Colin Powell also spoke with Foreign Minister Abdullah Gul.

Turkey has long maintained troops in parts of northern Iraq to fight autonomy-seeking Kurdish rebels who have launched attacks on Turkish targets from bases in northern Iraq.

Turkey fears that increasing Kurdish power in northern Iraq could encourage Kurdish rebels to revive fighting in Turkey's predominantly Kurdish southeast.

Turkey also sent military observers to Iraq following the U.S.-led invasion to protect members of the Iraqi Turkmen minority.

Ties between the United States and Turkey have been strained since March when Turkey's parliament refused a U.S. request to station some 60,000 troops on Turkish soil for an invasion of Iraq from the north.

Turkey had been trying to repair ties when the detentions came. It had eased the flow of humanitarian aid across its territory, offered to send peacekeepers to Iraq and opened its bases to the U.S.-led coalition for logistical support.

On Monday, a line of vehicles nine miles long could be seen at Turkey's border gate with Iraq _ a key transit point for coalition logistical supplies and U.N. aid to Iraq. The gate has been closed since Friday, apparently in retaliation for the detentions.

A senior Turkish commander, Gen. Hursit Tolon, called the incident ``disgusting and ugly'' and was boycotting a military ceremony in Washington.

Police in Istanbul had to use tear gas to disperse hundreds of nationalists who staged an anti-U.S. demonstration.

U.S. troops initially took an undetermined number of troops and support personnel into custody, and released some on Saturday.

Emel Begler, a cook who was released Saturday, with her 15-year-old son was quoted in the Turkish newspapers as saying that the U.S. troops broke down the doors, placed sacks over their heads and handcuffed their hands behind their backs.

``I tried to prevent them. I scuffled with the American soldiers. They hit me with the butt of their weapons,'' she said, showing journalists bruises on her arm.