Consumer prices took an unexpectedly sharp turn upward in July, indicating that inflation had been gaining momentum even before the Iraqi invasion of Kuwait sent oil prices spiraling.

The consumer price index rose 0.4 percent in July, the Labor Department said yesterday, substantially higher than most economists had predicted. So far this year, consumer prices have risen at an annual rate of 5.8 percent, compared with 4.6 percent for all of 1989.

Despite the economy's sluggish growth, the so-called core inflation rate -- the rate excluding food and energy prices -- continued to accelerate, registering 0.6 percent in July.

With the recent run-up in oil prices, the overall consumer price index will probably get worse before it gets better, said Stephen Roach, economist at Morgan Stanley & Co.

"With the prospects for higher energy prices coming down the pike, the inflation outlook is pretty bleak," said John Williams, economist for Bankers Trust.

Stock prices plunged on the economic news as well as on indications that tensions with Iraq were not easing. The Dow Jones index of 30 industrial stocks fell 66 points. {Details on Page B1.}

The dollar fell on currency markets, setting another record low against the German mark, reflecting concerns about the American economy.

Also contributing to the gloom on financial markets yesterday was a report of falling housing starts in July -- the sixth month running and the longest string of monthly declines since the recession of 1981-82.

The Commerce Department said housing starts fell 2.6 percent to a seasonally adjusted annual rate of 1.15 million units, the lowest since September 1982.

The biggest drop was in the multifamily dwellings.

With housing, as with inflation, the situation is likely to get worse.

Warren Lasko, executive vice president of the Mortgage Bankers Association of America, said that, during August, applications for loans "almost ground to a halt" as people wait to see how secure their jobs are and how the crisis in the Persian Gulf will affect inflation and interest rates.

The combination of sluggish growth and high inflation puts the Federal Reserve in "a very tough position," Roach said.

Even though the Bush administration and banks have been urging the central bank to lower interest ratesto spur growth, the Federal Reserve might now have to increase rates to make a credible stand against inflation.

"To deal with the tremendous pressures on the inflation front is fraught with all sorts of peril," Roach said. Higher interest rates would increase the cost of the savings and loan cleanup, increase the budget deficit and hurt corporate earnings.

Moreover, some economists fretted, a weaker economy might have little impact on some of the biggest inflation factors in coming weeks, such as stubbornly rising medical costs and higher oil prices. Medical costs jumped 0.9 percent in July.

"We've had a thesis that as the economy does move toward weaker demand and a recession, {that} doesn't mean that we'll get better inflation numbers," said Helen Hotchkiss, senior economist for Barclays de Zoete Wedd Research, the investment banking arm of Barclays Bank. She said there is "a stalemate on inflation that could take a long time to work through."

"Stagflation is a very real possibility here," said Williams.

Stagflation is the term used to describe the 1970s era of persistently high inflation coinciding with slow growth. Normally, slow growth brings down prices. Williams said that a rise in oil prices could give the economy the final push into stagflation.

Just how weak the economy is already remained a matter of some dispute. Hotchkiss said the U.S. economy was "virtually in recession even before the onset of higher oil prices. Higher oil prices will simply intensify the downturn in the economy."

However, Roach of Morgan Stanley said the inflation rate was "symptomatic of an economy that is not on its knees." He said he doesn't think the economy is in a recession yet. He cited strong exports, increases in consumer demand and moderate growth in business investment.

Roach also said that "the inflation psychology is not as deeply imbedded" as it was at the beginning of the 1980s when it took double-digit interest rates to bring down inflation. "It will not take double-digit interest rates to bring down inflation," he said. "It will take higher interest rates, though."