U.S. retail sales fell a surprising 0.7 percent in May, marking the first time since the last recession that sales have retreated three months in a row, the Commerce Department said yesterday.

Wall Street economists had forecast a slight 0.1 percent gain. But they apparently underestimated consumer caution about making purchases amid uncertainty about the economy's direction. Sales were lower in nearly all major categories of goods.

The May decline follows a revised decline of 0.9 percent in April and 0.4 percent in March. Officials said the last time retail sales fell for three consecutive months was September to November 1981, when the country was mired in a severe recession.

Auto dealer sales, which account for about a fifth of total retail sales, fell 0.6 percent in May after declining 1.6 percent in April.

Spending by consumers accounts for about two-thirds of the nation's gross national product so any slowdown in retail business can affect output of goods and services quickly.

Analysts have noted total sales growth in the final three months of 1989 and the first quarter this year averaged only a 4.1 percent annual rate, barely enough to keep pace with the core rate of consumer price inflation that is assumed to be between 4 percent and 4.5 percent.

The April fall in retail sales was revised from a 0.6 percent decline to a 0.9 percent decrease.

In addition to cars, categories that showed declines in both April and May included gasoline service station sales, general merchandise store sales and sales of building materials.

Sales of durable goods, meant to last three or more years, fell 1.1 percent in May after decreasing 1.7 percent in April. Sales of nondurable goods, such as food and disposable items, dropped 0.5 percent in each of April and May.