TOKYO (AP) _ Japan and the United States agree that rapid changes in foreign exchange rates can be harmful and are maintaining close contact about recent gains in the yen, Japan's finance minister said Tuesday.

``Sudden changes in foreign exchange rates are undesirable, as they have an impact on the economy. In more ways than one, we are speaking with the U.S., and basically, we've agreed that sudden changes are undesirable. If necessary, we must respond,'' Finance Minister Kiichi Miyazawa said in parliament.

He added that the yen's recent rise against the dollar has been excessively strong.

Miyazawa had spoken by telephone with U.S. Treasury Secretary Lawrence Summers about foreign exchange, the Finance Ministry said Tuesday.

The ministry said the two nations agreed to maintain close contact on foreign exchange policy.

A U.S. Treasury spokeswoman in Washington confirmed that Summers and Miyazawa spoke by phone about ``the current economic situations in the United States and Japan, including recent developments in exchange markets.'' The spokeswoman added that ``they agreed that their deputies would continue the discussions which have taken place over the past few weeks and that they would keep in close touch with each other on these matters.''

Miyazawa's comments, and news of his contact with Summers, helped reverse a sharp rise in the yen recently by raising expectations that Japan might step into markets to drive its currency lower.

The dollar bought 115.40 yen Tuesday afternoon, up 1.36 from yesterday in Tokyo and above its late New York level of 114.22.

The yen has risen against the dollar over the last several weeks as growing optimism about the prospects for economic recovery in Japan has brought of a flood of foreign cash into Japanese markets.

The dollar fell from more than 120 yen last month to below 114 yen on Tuesday.

Japanese financial authorities and executives worry that a strong yen could wipe out overseas profits for Japanese companies. A stronger yen forces Japan's exporters to raise prices abroad or face lower earnings when overseas revenue is converted into yen.

Japan has spent an estimated $30 billion over the last two months trying to drive its currency lower by flooding the market with yen, but traders have said authorities have been less active in recent weeks.