In several international roles, Japan is looked upon as something of a backslider. Allies persistently exhort Tokyo to play fair with world trade, make room for Indochina refugees, and spend more money for its own defense.

So it was something of a role reversal a few days ago when a Foreign Ministry official walked over to the U.S. Embassy here to deliver a message of consternation: big cuts in U.S. foreign aid, he declared, would have a deplorable effect on international efforts to help poor countries. They would, he said, refute the longstanding American campaign to get Japan to give more aid.

The incident underscored a marked change in Japan's once niggardly approach to foreign aid. In the past three years, it has doubled its grants and loans and now feels able to prod other nations to do more, too.

It now ranks fourth on the aid-giving roster of industrial countries. Prime Minister Zenko Suzuki, after a struggle with budget cutters, has proposed a new five-year package that would at least double the amount spent in the past five years.

In terms of economic resources, Japan still lags behind 11 Western democracies in handing out aid, and the new plan will not change that ranking. But it is ahead of the United States, which ranks 15th in that respect, and diplomats credit Japan with making an extraordinary change in the past few years."It's a noble effort, no matter how you look at it," said an American diplomat.

More significantly, in the eyes of developing countries that get it, Japan has significantly shifted its aid program one designed primarily to promote its own business interests to a more generous concept. Less of the money is hedged with requirements that it be spent back in Japan. More is in outright grants, less in loans to be paid back.

The focus also has changed to a more sophisticated form of aid giving. It used to be mainly handouts for building roads, drainage systems, and the like. The new plans aim at training recipients in Japanese technology or lending start-up assistance for small and medium-sized businesses.

It is not all altruism. Japan has come to believe it has a broad interest in the stability of friendly developing countries, especially in Southeast Asian countries rich in natural resources Japan needs.

About 40 percent of its aid goes to five Southeast Asian nations visited by Suzuki recently on his first trip abroad as prime minister.

He announced several multimillion dollar grants, promised to help Thailand and the Philippines develop energy resources, offered each one a new technology training center and launched two long-installed industrialization projects in Indonesia and Malaysia.

Until the late 1970s, Japan was a parsimonious donor whose aid budgets were largely an extension of the country's aggressive mercantilism. Loans and grants were, in the vernacular, "tied" by agreements requiring that about 40 percent of the funds to be spent buying goods from Japan, often at high prices.

For example, much of Japan's aid to the Philippines until the mid-1970s had to be spent buying Japanese ships, highway-building materials and other goods. Like other recipients, the Philippines objected. "It was as if I gave you some money and then insisted that you buy a dress from me," recalls Edna Ventura, an aid attache with the embassy here. "In the end, I would profit. But the Americans used to be the same way."

Now, only about 16 percent of Japan's aid is "tied" and the total amount of grants has grown swiftly. The government embarked on a campaign in 1978 to double the total in three years. It has now surpassed that goal and will spend about $3.3 billion this year.

The new path stems from a substantial change in Japanese attitudes a few years ago, according to Koichiro Matsuura, economic aid specialist at the Foreign Ministry. Public opinion polls began showing a majority of Japanese in favor of helping other countries, he said.

"That sentiment did not exist in the 1960s," Matsuura said. "But in the 1970s, we reached a high stage of development and life became more comfortable for the Japanese. People were able to look around in the world. They also feel that what happens to their economy depends on what happens in the poorer countries."

Suzuki seized on the momentum this year to propose another long-range doubling of aid budgets. In part, sources say, it is to make up for Japan's inability to expand its military defense budget this year, to the dismay of the Americans. Suzuki has re-defined defense to embrace what he calls "comprehensive security," a catch-all that includes economic aid. One aide has said that in lieu of a defense buildup, Japan should concentrate on increasing economic assistance. "Suzuki is well aware of that," said one official.

As in the United States, budget cutters in Japan sliced away at the Foreign Ministry's original proposal and the new five-year plan is not as expansive as aid enthusiasts had hoped. In the past five years, Japan spent $10.7 billion on official development assistance. In the next five years, the plan calls for spending at least twice that -- $21.4 billion -- and it will go higher if the budget crunch eases.

Foreign experts regard that planned growth as significant, but it does not really take Japan near the goal Suzuki so proudly announced on his Southeast Asian trip. Suzuki said Japan would improve its aid spending as a percentage of gross national product. But the five-year plan would actually result in a drop in that percentage if Japan's GNP grows at the high rate economists predict.