TOKYO (AP) _ Prime Minister Morihiro Hosokawa may have won vital political points at home by refusing U.S. demands aimed at opening Japan's markets and trimming its massive trade surplus.

But however proud they may be that their nation has finally stood up to the United States, many Japanese worry that the clash may turn into a nasty trade war that could drive their ailing economy even deeper into recession.

After failing to reach a trade agreement during his summit in Washington on Friday with President Clinton, Hosokawa said the ability of the two governments to agree to disagree showed their relationship had matured from that of two siblings to one ''between adults.''

''I firmly believe that our relationship in this new era is maturing to an extent each of us respects and has confidence in the judgments of the other,'' Hosokawa said, ''but at the same time frankly admits what we can and what we cannot do.''

Many Japanese have resented their government's tendency in the past to cave in to U.S. pressure on trade as an unpleasant reminder of Japan's defeat in World War II and the American occupation that followed.

U.S. officials, armed with trade statistics that show Japan's trade surplus surging to all-time highs, argue that foreign firms are being shut out of the Japanese market and that agreements without specific criteria to measure progress are meaningless.

Japanese officials accuse the United States of seeking numerical targets, which they denounce as ''managed trade.'' They say that setting targets, such as the number of U.S. autos to be sold, would violate internationals standards of free trade.

''I believe most Japanese political leaders will take (the breakdown of talks) very calmly because they feel the position put forward by the U.S. government is ridiculous,'' said Takashi Inoguchi, professor of politics at Tokyo University.

''The Japanese government is more worried about the domestic economy than about trade,'' he said. ''And they're even more worried about the long-term effects of succumbing to U.S. demands that are rightly seen as pushing everyone toward protectionism.''

''In the past, we were forced into agreeing to buy more American cars, and then found we wouldn't be able to sell them,'' says Yukio Okamoto, a former trade negotiator. ''It doesn't make sense.''

Officials on both sides stressed that the U.S.-Japan alliance remained strong on other fronts, in particular in dealing with such international concerns as North Korea's nuclear program.

But the heavy U.S. focus on trade left an impression that the Clinton administration has limited its view of Washington-Tokyo ties to the economy only, Okamoto said.

Before leaving Washington on Saturday, Hosokawa cautioned the United States against imposing punitive trade sanctions. He warned that Japan would protest any sanctions to the General Agreement on Tariffs and Trade, the international watchdog for free trade.

Harsh retaliation could hurt both sides, given the heavy interdependence of their high-tech industries and the hundreds of thousands of U.S. jobs at Japanese-owned businesses in the United States.

Speculation that the trade dispute will deepen has pushed Japan's currency to its highest level in three months - pinching Japanese manufacturers struggling through their third year of stagnation.

Following the summit, the yen closed in New York at 107.13 yen per dollar, up sharply from 108.25 yen late Thursday. A higher yen makes Japan's exports more expensive overseas and its imports cheaper.

''If the yen goes to 98 yen per dollar, Japanese officials may have no option but to give in,'' said Richard C. Koo, senior economist at Nomura Research Institute in Tokyo. ''They're already struggling right now.''

-02-12-94 1218EST