Egyptian President Hosni Mubarak moved quickly today to quell unrest over sharply rising prices that sparked rioting Sunday in an industrial town outside Alexandria. Three persons reportedly were killed in the rioting and as many as 40 were injured.

The Egyptian leader, facing his first big domestic crisis since taking office three years ago, ordered price rollbacks, a halt to other planned increases and the restoration of one-cent flat bread, the mainstay of many poor, working-class Egyptian families.

The all-day rioting Sunday in Kafr el Dauwar, 16 miles south of the coastal city of Alexandria, triggered a government order placing security forces on high alert here and in all other major urban centers.

The order came one day after parliament had approved a government request for a 19-month extension of the state of emergency that has been in effect since the assassination of former president Anwar Sadat on Oct. 6, 1981.

Kafr el Dauwar, a grubby milling center, was reported calm today but still extremely tense with hundreds of security police patrolling the streets. On Sunday, several thousand demonstrators stoned cars and public buildings there, rampaged through the main market and cut traffic on the rail line and delta road between Alexandria and Cairo.

Police reinforcements used tear gas and fired bullets into the air to disperse the crowds.

The government made no mention of casualties in its statement on the incident, which it blamed on "leftist extremists." Both the opposition National Progressive Unionist Party and eyewitness accounts cited by Reuter said three persons, two of them taxi drivers, had died.

Estimates of the number of injured varied from 25 to 40, including half a dozen policemen. More than 50 persons were arrested during the day-long melee.

Rioting broke out in Egypt in January, 1977 when Sadat decreed similiar price increases on government-controlled commodities. Violence here and in Alexandria caused 79 deaths, 800 injuries and property damage well into the millions.

Since then, no issue has been more delicate politically than price increases, particularly on bread. One government after another has put them off in favor of steadily increased subsidies.

Government food subsidies during the last fiscal year amounted to about $1.6 billion and are scheduled to increase to more than $2 billion this year. The annual bread subsidy alone is estimated at about $400 million.

The Mubarak government has sought to cut these outlays through a policy of "creeping price reforms." But it recently increased prices for two key items -- cigarettes and bread. The price hikes brought home to many poor Egyptians the galloping increase in the cost of many uncontrolled market items during the past year or so.

In mid-September, the price of the two most popular Egyptian-made cigarettes rose from 33 to 40 cents and from 35 to 45 cents. A week ago the government raised the price of 140 grams of flat bread from one to two cents and introduced a smaller 69-gram version for one cent.

The new one-penny flat bread is made of extremely coarse grains, and many Egyptians say it is inedible. In any case, it is often hard to find. The net effect has been to double the basic cost of bread for most people.

Today, Mubarak ordered the old size of flat bread costing one piaster, or one cent, restored in all working-class areas. To ensure the supply of bread, he ordered an increase in production.

He also rolled back price increases on macaroni and cooking fat sold in the state-run grocery stores and froze -- without prior approval of the government -- all price increases by private as well as state-sector companies.

Ironically, rioting in Kafr el Dauwar was touched off by another issue, a 3 percent increase in payroll pension deductions for all state workers.

Workers at the Misr Spinning and Weaving Co. there staged a sit-in Saturday night and refused to accept end-of-the-month wage checks. The strike snowballed into a general protest against price hikes as townspeople and workers' relatives from nearby villages joined in.

"The workers saw their wages decreasing just as prices were increasing," remarked one western diplomat. "It was bad timing on the part of the government."