Iraq, facing U.N. cease-fire talks, said late Saturday it had pulled its forces out of Iran - two days after launching an offensive in the southern sector of the Persian Gulf war front. Iran said the Iraqis were routed in fierce hand-to-hand fighting. Casualties were heavy.

The state-owned Iraqi News Agency quoted a military spokesman in Baghdad as saying Iraqi troops pulled out of Iranian territory and returned to positions they held two days earlier along the international border.The agency quoted the Iraqi military spokesman as saying the Iraqi push was aimed at taking prisoners and that Baghdad had "no territorial ambitions." He said Iraqi forces captured a total of 8,635 Iranian troops in two days of fighting.

The offensive, which Iraq said was supervised directly by President Saddam Hussein, came four days after Iran accepted a U.N. resolution calling for an immediate cease-fire and negotiations to end the nearly 8-year-old gulf conflict.

Tehran radio monitored in Bahrain confirmed the Iraqis were no longer inside Iran but quoted military communiques as saying Iran's "Islamic Forces" had repelled the Iraqi assault, inflicting heavy casualties.

Iran said the Iraqis had attempted to capture the southern port city of Khorramshahr and parts of the Ahwaz-Khorramshahr highway that runs close to the Iran-Iraq border.

Tehran radio said hand-to-hand fighting took place after the Iraqis crossed the border two days ago, and Iranian forces inflicted heavy losses on the invaders. Fighting continued until late Saturday, one communique said.

Middle East analysts said the latest Iraqi attacks had been aimed at strengthening Iraq's bargaining position as the two warring nations headed toward a U.N.-sponsored truce.

Iraq said Friday it was trying "to capture more Iranian troops to balance the number of Iraqi troops captured by Iran" earlier in the war.

Earlier, the official Tehran radio had interrupted its normal broadcast several times to ask able-bodied Iranians to rush to the front and "courageously confront the savage onslaught of the enemy."