Faced with the country's worst riots in 25 years, the Egyptian government today suspended price increases on food and other commodities that it had imposed Monday.

More than 30 persons were killed, according to unofficial reports, in rioting yesterday and today in Cairo and Alexandria.

The capital, its suburbs, the Mediterranean port of Alexandria and the city of Suex were placed under full curfew late today as the government of President Anwar Sadat sought to control the country's worst outbreak of domestic violence since the monarchy was overthrown in 1952.

(Demonstrators defying the curfew battled with police in two densely populated Cairo suburbs tonight, Reuter reported, and eyewitnesses said 13 persons were killed.)

Damage caused by the two days of rioting already runs well into millions of dollars. But there is a potentially greater long-range effect in their impact on Sadat power.

There does not appear to be an immediate threat to Sadat's presidency. But foreign observers fear the domestic unrest and any weakening of Sadat's authority might lessen his moderate influence in the Arab community and divert him from his quest for a peace settlement with Israel.

The government's announcement that it was backing down from the price increases came after a morning of roving battles between thousands of rioters throwing rocks and police firing American-made tear gas.

The sequence recalled a similar back-down by the government of Poland last year after increases in the prices of staples, also intended to stabilize the economy, provoked widespread riots.

The Egyptian government announced that Sadat had approved a request from Premier Mamdouh Salem for a "suspension" of the price increases "pending reconsideration." The increases had ranged up to 31 per cent on such items as wheat, soap, rice, cooking gas, cigarettes and some textiles.

The imposition of these increases touched off antigovernment demonstrations by students and workers yesterday that grew today into an uncontrolled frenzy of window-breaking, burning, rock-throwing and attacks on government buildings and property owned by wealthy Arabs.

It was exactly the reaction that the government had feared if it cut the subsidies that have held the price of these commodities to an artificially low level and enabled the country's improvished masses to keep eating.

But the government's hand was forced by international financial organizations and countries that give aid to Egypt. They have been demanding, as a price for further assistance, that Egypt reduce or eliminate the subsidy program it has had for 24 years. It has been costing the financially burdened government a billion dollars a year.

How these aid donors and lenders will react to the return of a system they had been pressuring Egypt to end remains to be seen.

Downtown Cairo and many of its working-class neighborhoods were in a shambles tonight. Even before the curfew, most shops had been closed and shuttered, public transport and taxi service had been shut off and the government had ordered schools and universities closed for two weeks.

The airport remained open despite the curfew.

There were no official casualty figures.

AL Ahram, the semiofficial newspaper, reported that as of tonight, 21 persons had been killed, 360 injured and 439 arrested in Cairo and Alexandria.

There was no clear pattern to the targets of the demonstrator's wrath. Shepheard's Hotel; the mass-circulation newspaper Al Akhbar, which had editorially supported the price increases; several police stations, buses and the science building of the American University were wrecked, burned or damaged.

In the Giza district, on the road to the pyramids, demonstrators sacked several nightclubs patronized by wealthy visiting Arabs. The poorer Egyptians resent the lavish spending by Arabs from oil-producing countries.

An Associated Press reporter said eyewitnesses outside a suburban police station that was set afire told him seven persons were killed when police fired into the crowd.

Police opened fire on a crowd near the AL Azhar Islamic University. Witnesses said a 10-year-old boy was killed.

Sadat, who returned to Cairo from Aswan, a winter resort 600 miles south of the capital, was a major target of the protests, A tank and troops guarded his residence here.

Demonstrators outside the official presidential residence shouted anti-Sadat slogans and praised the late President Gamal Abdel Nasser, whom the poor considered their champion.

Crowds chanted, "We are dying of hunger anyway so kill us, Sadat, with your bullets."

Others shouted, "You are living it up in Aswan while we have to eat stones," and "Down with the Khedive," a reference to Egypt's corrupt rulers during the Ottoman empire.

Referring to the recent wedding of Sadat's youngest daughter, protestors shouted, "Your daughter is dressed in the latest fashions and we are 10 to a room."

Sadat had been in Aswan yesterday awaiting the arrival of Yugoslav President Tito. Because of the death in a plane crash yesterday of Yugoslav Premier Dzemal Bijedic, however, Tito canceled his visit.

Demonstrators today burned triumphal arches erected in Aswan to welcom Tito, Untied Press Internationl reported.

Premier Salem said the riots have been "under the command of Communnists." While Communists may have played a role in touching off the demonstrations yesterday, by this morning the protests had gone far beyond political demonstration into a general wave of unrest and violence.