Iranian President Hassan Rouhani has paid a landmark visit to Japan, calling on the country to help confront the United States' bid to wreck the 2015 nuclear deal with Tehran.

Rouhani became the first Iranian president to visit Japan since 2000 when he landed in Tokyo Friday, his overnight stay seen as the international outreach to the important Middle Eastern country despite US efforts to isolate it.

The Iranian president inspected a guard of honor along with Japanese Prime Minister Shinzo Abe at the latter's central Tokyo office before summit talks and a dinner scheduled to last into Friday evening.

Despite being a military ally of the US, Japan has traditionally maintained friendly relations with Iran as a major source of energy. In 2017, Iran supplied 5.2 percent of Japan’s crude oil imports.

Iran's oil exports, however, have been disrupted by unilateral American sanctions on the Islamic Republic.

Japan also relies on the Middle East for nearly 90% of its oil needs, but tensions have risen to new highs amid US deployment of new troops and military assets to the Persian Gulf.

Tensions have escalated since President Donald Trump’s decision last year to withdraw from the Joint Comprehensive Plan of Action (JCPOA), as the international nuclear agreement with Iran is officially called.

“The nuclear deal is an extremely important agreement, and we strongly condemn the US withdrawal, which was one-sided and irrational,” Rouhani said in the meeting with Abe on Friday.

“We hope that Japan and other countries in the world will make efforts toward maintaining the agreement,” the Iranian president added.

President Rouhani has said that the purpose of his visit to Japan is to discuss the security of the Middle East and calming tensions in the Persian Gulf.

Abe plans to dispatch a Self-Defense Force destroyer and patrol plane to the Middle East. He is expected to explain the dispatch plan to Rouhani to seek a green light from Iran for the operation, Japan Times said.

Abe reportedly plans to send the SDF unit an "independent” mission for "research and investigation,” to the sea off Oman and Yemen and its surrounding areas, not including the Strait of Hormuz off the Iranian coast.

"Japan would like to do its utmost to ease tensions and stabilize the situation in the Middle East," Abe told Rouhani Friday.

The Japanese prime minister, instead, wants Iran to remain committed to the JCPOA despite the US withdrawal.

“I strongly expect that Iran will fully comply with the nuclear agreement and play a constructive role for peace and stability in the region,” Abe said.

The Islamic Republic has begun scaling back its commitments under the nuclear deal in retaliation for the US withdrawal and sanctions and the failure of the other signatories of the accord to sufficiently support Tehran.

Iran is unhappy with the Europeans for failing to confront the United States and make it abandon its hostile policies toward Tehran.

Whether Japan will be able to create a dramatic about-face in Washington's confrontation policies is anyone's guess.

Abe visited Iran in June, but as he sat down for talks with Leader of the Islamic Revolution Ayatollah Seyyed Ali Khamenei, two tankers — one of them operated by a Japanese firm — came under attack in the Gulf of Oman, in what many observers saw an attempt to scuttle the effort.

Nevertheless, Tehran is interested in preserving friendly relations with Tokyo and wants the Asian powerhouse to keep them independent from American pressure.

On Monday, Iranian Deputy Foreign Minister Abbas Araqchi told Japanese reporters that Iran now hopes "the strong bilateral relationship” between Japan and Iran "will be able to overcome pressure” from the United States.

He also said that Tehran hopes the Japanese government and firms in the nation will resume importing oil from Iran, according to Japanese broadcaster NHK.