A subterranean fire ignited by flooding from a broken water main blacked out 20 blocks in midtown Manhattan yesterday, closing stores such as Macy's and Gimbels and disrupting business in the garment district during market week.

Officials at Consolidated Edison warned that it may be next week before electricity is restored to all of the Herald Square area, one of the city's busiest centers of retail trade.

Traffic lights were knocked out and traffic was snarled. Police, fearing looting and other crimes after dark, assigned 500 to 600 extra officers to the area.

Market week, when out-of-town buyers come to the garment district to purchase new fashions, was disrupted, with one salesman saying the industry would "lose a billion dollars."

Thousands of people stood in the afternoon sun outside Macy's and Gimbels department stores, some pounding angrily on the locked doors. "They said they might have lights in three hours--or it might be three days," said Robert Wright, a guest at the powerless New York Statler Hotel. "What are we thinking? We're thinking about going back to Detroit."

Later, the Statler's 1,300 guests were ordered to leave for safety reasons.

The disruption began shortly after 1:30 a.m., when a 12-inch main--68 years old and weakened by stress and vibration--broke underneath 38th Street and Seventh Avenue.

Water flooded a Con Ed power substation 40 feet underneath the streets, setting off electrical short fires in a transformer vault and knocking out power for the area bordered by 30th and 42nd streets and Sixth and Seventh avenues.

Officials said 50,000 gallons of mineral oil used as a coolant, along with wiring and insulation, caught fire.

Fire Commissioner Joseph Spinnato said the blaze was so intense that it went up an air shaft and ignited a fire on the roof of a 25-story building.

The fire was reported out at 4:30 p.m. There were seven minor injuries.

In Las Vegas, meanwhile, a flash flood swept the Strip, driving gamblers from the Imperial Palace and flooding convention rooms at nearby Caesars Palace. Two men were missing after their car was swept away.