United Nations Secretary General Javier Perez de Cuellar met yesterday with Iraqi leaders in Baghdad following talks in Iran, but analysts here and at the United Nations were doubtful that he had succeeded in reaching any compromise that could lead to negotiations to end the 4 1/2-year-old Persian Gulf war.

The secretary general's visit to Tehran on Sunday had raised hopes in the region that Iranian leaders' willingness to see him might signal a softening of terms for settling the conflict, but there was scant evidence of this in the rhetoric after his departure.

"I would have to conclude that he's coming out empty-handed," said one U.S. official closely following the situation in the gulf. "I really don't know why he went."

Others found some cause for optimism in the reception Iranian leaders accorded Perez de Cuellar in Tehran.

Just before he left yesterday, Iranian parliamentary speaker Ali Akbar Hashemi Rafsanjani was quoted by Tehran radio as telling the U.N. chief, "If there is a way to end this war, then it is the way you have chosen . . . . You must pursue your latest move with candor and bravery, and be assured that we -- contrary to malicious, imperialist propaganda -- have no desire for aggression."

A U.N. spokesman said, "I think this is the very, very beginning of a process. I think it would be foolhardy to talk about breakthrough."

"What is important is he has been accepted by both sides -- mediator is much too strong a word," the spokesman added. "They will speak to him, even if it is just to trade insults."

Although fighting has abated during Perez de Cuellar's diplomatic efforts between the two combatants, Iran's official Islamic Republic News Agency accused Iraq yesterday of using deadly chemical weapons again in four areas on their southern battlefront, news agencies reported.

IRNA said Iraqi forces dropped chemical bombs and artillery shells containing mustard and nerve gases. The attack could not be confirmed independently. Last month, after Iran made similar charges, the State Department said it had independent evidence verifying that Iranian soldiers flown to Western Europe had been the victims of chemical weapons.

After Perez de Cuellar arrived in Baghdad, where he was met by Iraqi Foreign Minister Tariq Aziz, Iraqi military communiques reported an increase in bombing sorties in the marshes of the southern battlefront where Iraq crushed a ground offensive last month. Iran had come within striking distance of cutting the strategic Baghdad- Basra highway.

Analysts here said the reports of increased Iraqi air raids in the area seemed to suggest that Iraq had become concerned about mass Iranian troop movements in the area. Iran shelled several Iraqi border towns with artillery.

In Baghdad, the official Iraqi News Agency said Iraqi President Saddam Hussein told the U.N. leader that he is willing to negotiate an end to the war with Iran but that Tehran does not want peace. Saddam Hussein insisted on a "comprehensive settlement" to the war, making it clear that Iraq no longer would agree to limited measures such as the now-shattered U.N.-mediated agreement to spare civilian targets.

Since the sharp upsurge in fighting during the past month, Iraq has used its overwhelming air and weapons superiority to bomb Iranian cities and attack Iranian economic installations, saying the choice is between "all-out peace or all-out war." Iran has complained repeatedly about the escalation. It has sought the reimposition of the ban on civilian targets and has appealed to international opinion to stop Iraq from using chemical weapons.

But Iran has refused to agree to any comprehensive settlement of the war that does not include the ouster of Saddam Hussein. Indications were that the Iranians had not changed that position during Perez de Cuellar's visit.