Economic activity was weakening around the country in August and early September even before the terrorist attacks, according to a new Federal Reserve survey. 

The central bank's check of economic conditions in its 12 regions for that period showed faltering manufacturing activity, slowing retail sales and rising layoffs. 

Meanwhile, the Commerce Department reported Wednesday that the trade deficit narrowed slightly in July to $28.83 billion as the weak U.S. economy reduced imports for a fourth consecutive month and spreading weakness overseas caused the biggest drop on record in U.S. exports. 

Taken together, analysts said the reports depicted an economy flirting with recession before terrorists flew hijacked airliners into the World Trade Center and the Pentagon on Sept. 11. 

``The economy has been very vulnerable and fragile all year,'' said Lawrence Chimerine, chief economist at Radnor Consulting. ``The attacks were devastating, and the timing could not have been worse because they came when the economy was already slipping.'' 

The Fed cut interest rates Monday for an eighth time this year, and many economists predicted the central bank would keep cutting rates until the cheaper money does the trick of restoring confidence for a rebound. 

The survey of economic conditions, known as the beige book, was prepared for the Fed's Oct. 2 meeting, when analysts expect a ninth rate cut. 

``I think the massive injection of liquidity by the Fed and sizable increases in government spending will to a large extent offset the weakness coming from layoffs as a result of the terrorist attacks,'' said Sung Won Sohn, chief economist at Wells Fargo in Minneapolis. 

He said the economy still had a chance of avoiding a recession, defined as two consecutive quarters of falling output. But he predicted it would be close, as output dropped by 1 percent in the current quarter and is expected to remain around zero in the final three months of the year. 

Airlines, facing widespread cancellations, have announced thousands of layoffs since the attacks. In the biggest single blow so far, Boeing Co. announced late Tuesday it will lay off 30,000 workers in the next year because of falling orders for new jetliners. 

The Fed report showed that back-to-school sales gave a boost to retailers in some areas, but overall consumer spending, the main force keeping the economy out of recession so far, was either flat or weaker during the survey period. 

Manufacturing, forced to cut more than 1 million jobs over the past year, ``remained weak in nearly all regions,'' the Fed reported. 

The trade report showed July's $28.83 billion deficit represented a 0.8 percent decline from a revised June figure of $29.07 billion. 

Imports of goods and services fell by 2.1 percent to $112.56 billion, the lowest level since January 2000, as the price of oil declined and demand decreased for products from cars to computer chips. 

Exports dropped by 2.5 percent to $83.72 billion, a drop of $2.17 billion, the largest monthly setback on record. Foreign demand declined for U.S. farm products and manufactured goods, including autos and computers. 

``The U.S. economy was barely growing during the summer, and the trade figures reflect that,'' said Joel Naroff, head of a Holland, Pa., forecasting firm. 

For July, America's deficit with Western Europe nearly doubled, to a record $8.6 billion. The deficit with China rose 13.2 percent to $7.48 billion, the highest level since last November. The imbalance with Japan rose 18.9 percent to $5.93 billion.