Egyptian President Hosni Mubarak and Jordan's King Hussein flew unexpectedly to Baghdad today to confer with Iraqi President Saddam Hussein.

The leaders' discussion of military requirements came as Iraq apparently began to drive away waves of attacking Iranian troops from strategic ground they reached in fierce battles in Iraq's southern marshlands.

Iraqi military communiques indicated that Iranian forces had pushed west of the Tigris River, reaching the vital Baghdad-Basra highway, before the Iraqi counteroffensive began turning them back. The fighting of nearly a week is described as among the bloodiest battles in the 4 1/2-year-old war.

The surprise trip of Mubarak and Hussein came on a day when a huge explosion in central Baghdad damaged a nearly completed building that diplomats said was to have served as the new Foreign Ministry. It was the third such explosion in Baghdad in the past five days, and Iran has said all were caused by its missiles. Iraq blamed the first two on sabotage and gave no explanation of today's explosion.

Mubarak's presence in the Iraqi capital marked the first visit there of an Egyptian leader since Iraq broke diplomatic relations at an Arab League summit meeting in Baghdad in 1979 to ostracize then-president Anwar Sadat for signing a peace treaty with Israel.

The Iraqi News Agency said Hussein and Mubarak met with Saddam Hussein for four hours before leaving Baghdad, The Associated Press reported.

[When he returned to Cairo late Monday, Mubarak called on Iran to negotiate peace with Iraq, and said the Iraqis were in a "good position" and did not need extra military assistance from Jordan or Egypt, United Press International reported.]

The Iraqi High Command declared an "epic" victory in the counterattack against Iranian forces in southern Iraq's Hawizah marshlands, and residents of Baghdad paraded in the streets celebrating the reportedly successful counteroffensive.

Sources in Washington said about 25,000 lightly armed Iranian troops from seven or eight divisions, most of them ill-trained Revolutionary Guards, had crossed the Tigris River by late Sunday and were conducting probes along the strategic Baghdad-Basra highway, which runs just west of the river and links the capital with the beleaguered Persian Gulf port city in the south.

Had the Iranians succeeded in their attempt to cut the highway 45 miles north of Basra, vital Iraqi supply lines would have been disrupted, forcing Iraq to commit large numbers of troops to maintain a precarious lifeline to Basra along a second, longer, north-south road to the west.

[The sources in Washington described a primitive Iranian force attacking in outboards and other small boats on the difficult marsh terrain, territory as treacherous as the Florida Everglades, against the Iraqis, who enjoy clear weapons and air superiority. They said Iraq had been slow to commit a large enough force to the counteroffensive and, through Sunday, had concentrated on knocking out Iranian artillery emplacements rather than confronting advancing ground troops directly.]

The Iraqi High Command's joyous announcement of a victorious counteroffensive yesterday and today was supported by a reliable western source with access to current photo intelligence.

Instrumental in helping turn the tide Sunday, the sources said, were Iraqi helicopter gunships and fighter-bombers that Iraq said had flown more sorties in the past week than previously in the conflict, which began in September 1980.

Today, the source said, the Iranians were being pushed back to their initial departure point, as far as 18 miles east of the Tigris River.

"The Iranians are still on the run," the source with access to photo intelligence said, "and once again they have shown they cannot sustain an offensive after making initial inroads" against a sluggish Iraqi Army slow to respond. "Now the Iraqis are really pouring it on," the source added.

No new Iranian military communique was issued after this morning. The wording and tone of the earlier communiques repeated by Tehran radio indicated Iran had halted its offensive, at least for the time being, Reuter reported from the Iranian capital. No clear indication of the present Iranian front lines was included in Iran's communiques.

The Iranians launched the marshland offensive on March 11 with small groups of troops -- a tactic that military specialists said was intended to neutralize Iraq's air and armor superiority by making the targets hard to find.

The sources also said the two sides appeared correct in their claims of having inflicted heavy casualties on each other, but there was no way of confirming them.

Neither side mentioned its own casualties, but an Iranian communique said its forces inflicted 12,000 casualties on Iraq and had taken 3,000 prisoners. Iraqi Information Minister Latif Nassif Jassim claimed today that 15,000 Iranians had been slain overnight between Saturday and Sunday alone.

In a statement this morning, Gen. Adnan Khairullah, the defense minister and Saddam Hussein's cousin, said eight Iranian divisions had been "crushed" in a "unique and epic" victory of Iraqi "believers" over the "evil Iranians."

The statement called on Iraqis in their "homes, in the streets, schools, factories and villages," to celebrate the victory. But celebratory street demonstrations broke up in panic just before noon when the huge explosion shook Baghdad.

An Iranian military spokesman quoted by the official IRNA press agency said Iranian forces had fired a ground-to-ground missile at Baghdad in retaliation for Iraqi air raids against Iranian cities. The spokesman said Iran had "no choice" but to "talk to Iraqi leaders in the same language," and it warned that Tehran would "turn Baghdad into ruins."

An Iraqi military spokesman said Iraqi aircraft had bombed four Iranian cities -- Hamadan, Isfahan, Kermanshah and Tabriz.

There were indications, however, that both sides were considering ending attacks on civilian targets.

The Libyan news agency JANA said Iranian leader Ayatollah Ruhollah Khomeini, in a message to Libyan leader Muammar Qaddafi, had signaled his willingness to end attacks on Iraqi cities and civilian targets if Iraq did likewise.

Saddam Hussein was reported to have indicated a similar willingness in a message sent to Indian Prime Minister Rajiv Gandhi.

Meanwhile, confusion was reported at Tehran's Mehrabad Airport, with foreigners seeking to fly out before Iraq applied its "prohibited war zone" orders to all Iranian airspace Tuesday afternoon.