Almost every month of late, the U.S. trade deficit has hit a new record, thanks to America's unflagging appetite for foreign goods. The pattern continued in May, with the gap ballooning to $21.3 billion, according to a government report released yesterday.

The report underlined a phenomenon that is both heartening and worrisome for the U.S. economy: On the one hand, Americans are feeling so prosperous that they are buying ever-rising amounts of imports -- $98.9 billion worth in May, about 2 percent more than the previous month.

On the other hand, most of America's trading partners are in such sluggish times that their purchases of U.S. exports -- $77.6 billion in May, down 0.8 percent -- are flat or even falling.

"What this shows is that domestic demand in the United States is still pretty strong, so we suck in a lot of imports," said Joel Prakken, president of Macroeconomic Advisers, a St. Louis forecasting firm. "And the weakness in exports suggests that the rest of the world's economies, while showing signs of recovery, are recovering only grudgingly."

The result is a widening imbalance that, if the trends of the first five months continue for the rest of the year, would produce a $225 billion deficit. That would far surpass the record $164 billion figure posted last year.

A large trade deficit, while not necessarily damaging to the economy in the near term, raises the risk of a plunge in the dollar that could trigger a wider financial crisis. That's because the United States must effectively borrow funds from overseas to pay its import bill, and if investors become worried that America is borrowing too much, they may dump their holdings of U.S. stocks, Treasury bonds and other dollar-based investments.

Accordingly, the Clinton administration greeted yesterday's report with a lack of enthusiasm, although Commerce Secretary William M. Daley, as usual, noted that the figures highlight how much better the U.S. economy is doing than economies elsewhere.

"The May trade figures reflect the continuing large gap between the strong growth in the United States and weaker conditions in many foreign countries," Daley said. "To reverse this troubling trend in our trade deficit, we should continue to promote stronger growth abroad and ensure that foreign markets are open to American products."

The figures came out the same day as Japan, the country running the biggest trade imbalance with the United States, took a step that could cause the gap to widen even further.

The Japanese central bank, which has intervened several times in currency markets in recent weeks to lower the yen and lift the dollar, did so again yesterday -- a move aimed at keeping Japanese goods from losing competitiveness on world markets.

Japanese officials have acknowledged that to keep their nation's nascent economic recovery from fizzling, they feel they must avoid damage to its export machine. Keeping the yen low helps make Japanese goods attractive to foreign buyers.

The dollar-yen rate rose about a yen and a half immediately following the intervention, to 119.73 yen per dollar, before settling back to 118.93 in late afternoon trading in New York.

The Japanese yen-selling and dollar-buying were executed through the Federal Reserve, acting as the Bank of Japan's agent in New York markets. But although the Fed is obliged to act as the agent for other central banks in such situations, the U.S. Treasury has made clear that it is not joining Tokyo and is opposed to such intervention. Treasury Secretary Lawrence H. Summers has indicated his displeasure with the Japanese policy, stating recently that Tokyo should increase its domestic demand rather than engage in "currency manipulation."

The Treasury declined comment yesterday, but Daniel Tarullo, President Clinton's former top international economic adviser, denounced the Japanese action. "They're using intervention as a substitute for growth-oriented economic policy," Tarullo said. "It is at best unhelpful, and at worst a distraction from what they ought to be doing."

The U.S. trade deficit with Japan narrowed about 7 percent in May, to $5.26 billion. But that was still higher than the $5.25 billion deficit with China, the $3.1 billion deficit with the European Union, the $2.3 billion deficit with Canada and the $2.2 billion deficit with Mexico.