Iraqi President Saddam Hussein announced yesterday that his forces have retreated from positions they had held well inside Iran for more than a year, as Tehran claimed that a week-long offensive had wiped out major units of Baghdad's invasion force.

Saddam Hussein, in a broadcast to Iraqi troops, cast the retreat as no setback but merely a "reorganization of our defense toward the rear," taken after "your strong blows absorbed the impact of the enemy offensive."

But Western journalists, in their first visit to Iran's front lines in more than a year, reported yesterday that Iraqi forces have been pushed back as much as 24 miles by an Iranian offensive that now apparently has been at least temporarily halted.

In a move that seemed related to the deterioration of Iraq's war effort, Jordan's King Hussein, the Arab world's staunchest supporter of Saddam Hussein, went to Baghdad yesterday for consultations. Hussein, who recently sent a volunteer Jordanian brigade to fight alongside Iraq, was accompanied by Prime Minister Mudar Badran and Brig. Gen. Zeid Ben Shaker, Jordan's Army chief of staff.

The acknowledgment of the retreat came a day after U.S. officials, citing intelligence reports, said it appeared that Iranian troops had decimated three Iraqi divisions in the Dezful area of Khuzestan, Iran's major oil-producing province, in the offensive that began March 21.

Iran radio on Monday called on all military forces to prepare for a "major and final" offensive, Reuter reported from Beirut yesterday. The broadcast seemed to indicate that the Islamic revolutionary regime is ready to push toward an end of the long-stalemated war that began in September 1980 after a dispute over control of the Shatt al-Arab, a border waterway that provides access to the Persian Gulf.

Iran's religious ruler, Ayatollah Ruhollah Khomeini, congratulated the Army and Revolutionary Guard on the offensive yesterday, saying that they had "stalled the Iraqi invaders in battles rarely seen in the history of war," Agence France-Presse reported from Tehran.

Saddam Hussein, whose forces poured as far as 40 miles into Iran along a 300-mile front in the early weeks of the war, also indicated that, in Iraq's view, the fighting had reached a turning point.

He said in yesterday's broadcast that Iraq's forces now face "the most sophisticated weapons and military equipment" and, for the first time, he expressed concern about a possible Iranian invasion of his country, saying that the new positions were intended to make it impossible for Iran to "achieve a deep penetration into Iraq or directly threaten our cities."

"We at the general command have decided to reorganize your defensive positions toward the rear," Saddam Hussein said.

"Reorganization toward the rear," he said, "does not conflict with the principles of fighting whenever this is deemed necessary. We chose and will choose the land on which to stand, whether inside their territory or on the border if this guarantees us . . . a better military situation to defend our land and prevent the enemy from advancing into it."

He told Iraqi troops, "I hope you will not be bitter over the land you are leaving willingly. . . .We never told you in the past to keep this land as part of Iraq. We have repeatedly and continuously declared that we took this land to defend our land and people."

Only once before had Iraq admitted pulling back its troops--last September, when Iran broke a year-long siege of Abadan, a major oil refining city on the border near the head of the gulf.

Iran said yesterday that it had killed or wounded 25,000 Iraqi forces in the current offensive and taken 20,000 prisoners. Saddam Hussein, in his message, claimed that Iraq had inflicted "very heavy losses" on Iran.

While Iran claimed that it had recaptured 800 square miles of its land, the Iraqi president said the war was nonetheless still being fought "inside their territory" and "five big Iranian cities are still under our Army's control and other cities are within the range of our artillery."

While Iran would probably claim "a great victory," Saddam Hussein said, the withdrawal of Iraqi forces came after they had "succeeded in halting the Iranian offensive," and he said that the move would not "affect Iraq's determination to pursue the fighting imposed on it by Iran."

Agence France-Presse reported the following from Beirut and Tehran:

Saddam Hussein's report did not specify the location of the Iraqi retreat but observers, interpreting preceding communiques from both Iran and Iraq, said it most likely involved the central battlefront sector between Dezful and Susangerd, 60 miles southeast.

Foreign journalists who have just toured the battlefront on the Iranian side reported that the Iranian advance appeared to slice in two the Iraqi force that had moved on Iran 18 months earlier, leaving it divided within Iranian territory, in the Abadan region to the south and Qasr-e-Shirin to the north.

The action, according to observers, left the Iranian Army in strategic positions a few miles from the border but within 36 to 50 miles of the Iraqi city of Amarah, an economic and communications center on the Tigris River.