Scores of persons were killed or wounded in powerful attacks in Baghdad and Tehran yesterday as Iran again rocketed the Iraqi capital and Iraq swiftly retaliated by sending its warplanes to attack a working class neighborhood of the Iranian capital.

U.S. officials said they are now convinced that the explosion in Baghdad and perhaps all of the five similar blasts during the past two weeks were caused by recently acquired surface-to-surface missiles fired by Iran. The officials, who initially had been skeptical that the explosions in Baghdad were caused by Iranian missiles, said they did not know how many such missile systems Iran has. They would not discuss the intelligence that led them to their new assessment.

Witnesses in Baghdad told The Associated Press that the midday explosion there was in an empty lot next to two schools and a bus station and caused hundreds of casualties, many of them schoolchildren.

Iraq made no immediate official statement on the number of casualties and barred reporters from viewing the damage or interviewing victims who were taken to hospitals in packed ambulances.

Iranian authorities reported at least 13 persons were killed and 50 injured in two Iraqi air raids over residential neighborhoods of Tehran. European correspondents in the Iranian capital reported hearing six heavy explosions in what they described as the deadliest attack on Tehran since the two countries began attacking each other's cities three weeks ago. Antiaircraft guns blazed as an electrical power cut plunged the city into darkness, news agencies reported.

Iran appealed to Arab and international opinion to pressure Iraq to agree not to use its superior air power to bomb cities and shipping or to drop chemical weapons and it warned conservative gulf oil states that the war could lead to "setting the entire area ablaze" if the attacks do not cease. Tehran newspapers threatened attacks by Iran on ports of Arab contries aiding Iraq if they continued their support.

The threats to widen the war, which Iran has reiterated since the escalation of the fighting earlier this month, appeared to be taken seriously in one conservative gulf state, Oman, where a senior military official was quoted in the press as saying he believed an Iranian invasion of the strategic Omani island of Musandam in the Hormuz Strait "is not unlikely."

Iraq, more aggressive and confident since its success earlier this month in crushing the latest Iranian ground offensive, continued to reject "piecemeal" cease-fire agreements ruling certain tactics off-limits, insisting instead that Iran agree to begin negotiations for a "comprehensive settlement" to end the war. The choice, one Iraqi communique said, is between "all-out war or all-out peace."

U.N. Secretary General Javier Perez de Cuellar said yesterday that he had made proposals aimed at scaling down the conflict but analysts here doubted Iraq would change its position or that the government of Ayatollah Ruhollah Khomeini had any present inclination to agree to end the 54-month old war.

In addition to Tehran, Iraqi warplanes attacked five other Iranian cities in two air raids yesterday. Analysts here said they believe that Iraq's continued bombardment of provincial Iranian cities is causing more damage and casualties than the bombing of Tehran.

They said Iranians and diplomats in the country were reported to be fleeing Iran by car in such numbers that there were waits of up to 15 hours at the Turkish border.

Analysts here said they had no precise information on the number fleeing since Iraq largely shut down commercial aviation over Iran last week by threatening to bomb passenger planes. Agence France-Presse said there were reports in Ankara that more than 130,000 Iranians had crossed into Turkey "on holiday" during recent weeks compared to about 5,000 last year.

A Turkish customs official told AFP that many Iranians hoped to escape for good from the "regime of the mullahs and their absurd war."

The daily Iraqi communique reported that Iraq's jets made 80 bombing raids against the "remnants of the defeated enemy forces" in the southern marshes of Iraq, scene of fierce, recent ground fighting where U.S. officials said as many as 15,000 Iranians may have been killed compared to about 3,500 to 5,000 Iraqis.

Iran announced it had fired more artillery on the beleaguered southern Iraqi city of Basra and claimed to have set ablaze oil installations in that area.