The U.S. economy grew at a 1.8 percent annual rate in the July-September quarter, stubbornly defying some economists' assertions that a recession began during the summer, the Commerce Department reported yesterday. It was the economy's strongest performance in a year and a half.

Nevertheless, many private economists continued to predict that the impact of rising oil prices and plummetting consumer confidence will trigger a recession, with a substantial decline in the gross national product, before the end of the year.

Bush administration economists were among those surprised by the economy's strength in the third quarter, compared with the 0.4 percent rate of growth in the second quarter. They agreed that growth in the current quarter and the first three months of 1991 will be well below the third-quarter pace. But they insisted no recession is imminent.

"Our best guess is that the economy will grow, although the next quarter or two will probably be somewhat weaker," said Michael Boskin, chairman of the Council of Economic Advisers.

At the Commerce Department, undersecretary for economic affairs Michael Darby, said, "This ... contradicts those who believe we are in a recession or are about to enter one. We expect the economy to continue to expand at a modest pace for the remainder of the year and in 1991."

In yesterday's advance report on GNP -- which will be revised twice as more complete information becomes available -- both consumer spending and business investment were stronger than all but a few forecasters had expected.

Meanwhile, inflation ran at a 4.1 percent rate in the quarter, up slightly from a 3.9 percent rate in the previous three months. More of the impact of soaring oil prices will show up in the GNP price index this quarter.

Despite the oil price shock, which according to two national surveys has knocked consumer confidence into a tailspin, households stepped up their spending at a 3.6 percent rate, after adjustment for inflation.

This compared with a 0.2 percent rate in the previous three months. Automobile sales gained, as did purchases of services, including more gas and electricity bought to cope with unusually hot summer weather in parts of the country, the department said.

Business investment gains were concentrated in the transportation sector, as carmakers made large fleet sales to car rental companies.

Negatives for the quarter included another sharp drop in housing construction, a small increase in the trade deficit, which tends to depress GNP, and a smaller increase in business inventories than in the second quarter.

Housing construction has now declined in seven of the last eight quarters and no one disputes that that industry is mired deep in recession. In a separate report, the Commerce Department said sales of new homes fell 6 percent in September to an annual rate of 503,000 units. It was the ninth drop in the past year and the worst in the last six months. Regionally, the September decline was worst in the Northeast, where only 54,000 new homes were sold.

For all the unexpected show of strength in the report, most forecasters were not changing their prediction that the longest peacetime expansion in the nation's history is coming to an end. The expansion began in December 1982 after the severe recession that began the year before.

"There is nothing in here that would cause me to change my forecast," said L. Douglas Lee, chief economist of Washington Analysis Co., though he, too, was surprised by the third-quarter gains. "What we saw in the third quarter does not carry over," Lee said. "I am predicting a recession that lasts three quarters with declines of between 1 percent and 2 percent annual rates each quarter. I am calling it a mild kind of recession, and not one that lasts a year."

Similarly, economist Roger Brinner of DRI/McGraw-Hill, who came very close in calling the third-quarter numbers, also expects a recession to begin this quarter. "The report doesn't change our forecast at all; it was so close to what we predicted," Brinner said. "Why was it so good? Until the Iraqi invasion, consumers thought we were going to have a soft landing" and no recession, he said. Now the confrontation in the Middle East and the uncertainty surrounding it has "devastated consumer confidence." That loss of confidence will have more of an economic impact than the loss of purchasing power associated with the sharp rise in oil prices, he added.

"I think we will get a reversal of the third-quarter gain, a 1.5 percent to 2 percent decline, in the fourth quarter," Brinner predicted.

A further small drop is likely in the first quarter and possibly in the second, Brinner said. "The recession will end when oil prices fall and stay down, because you have to restore confidence and purchasing power," he said.