Iran sounded out Japan on Tuesday about President Hassan Rouhani visiting the Asian country, a source close to bilateral relations said, as Tehran looks for a way out of an impasse over a nuclear deal with world powers.

Abbas Araghchi, Iran's deputy foreign minister for political affairs, serving as a special envoy of the president, relayed the message to Japan during his two-day visit to Tokyo from Monday, according to the source.

Iran is seen as hoping to realize a visit by Rouhani at an early date, while Japan is expected to carefully examine its feasibility. If realized, it would be the first visit by an Iranian president since Mohammad Khatami in October 2000.

Building on years of friendship, Japan has been stepping up efforts to reach out to Iran, reeling from economy-crippling sanctions that the United States reinstated following its withdrawal from the 2015 nuclear deal.

Prime Minister Shinzo Abe visited Iran in June as the first Japanese leader to do so since 1978 in the hope that he could broker dialogue between Tokyo's longtime friend Tehran and security ally Washington. But he returned home after making scant progress.

Rouhani has welcomed Japan's efforts to ease tensions in the Middle East, the Iranian deputy foreign minister said Tuesday during a meeting with Abe, according to Japan's Foreign Ministry.

Iran has gradually stepped away from commitments under the landmark agreement under which it promised to limit its uranium stockpiles and enrichment levels in exchange for relief from economic sanctions.

It has done so in response to President Donald Trump withdrew the United States from the deal last year, calling it "horrible" and "one-sided."

Regional tensions have escalated since attacks earlier this year on oil tankers near the Strait of Hormuz, the crucial sea lane out of the Persian Gulf, and a strike on Saudi Arabian oil facilities, both of which the United States has blamed on Iran.

In a separate meeting with Japanese Foreign Minister Toshimitsu Motegi, Araghchi said the current situation in the Middle East and around the Persian Gulf is "more serious than ever before."

"Tensions continue to run high. That is why discussions and cooperation between Japan and Iran are becoming more and more important," he said.

Araghchi hailed Abe's trip in June as a "turning point" in bilateral relations.

The United States, meanwhile, has called for a coalition to patrol waters near the strait and protect commercial shipping, dubbed Operation Sentinel.

Japan has opted not to participate in the coalition, instead planning to send a Maritime Self-Defense Force ship and a patrol plane to the region for "research" purposes.

Related coverage:

Uranium particles discovered at undeclared site in Iran: IAEA

Japan mulls SDF dispatch to Mideast without joining U.S. coalition

Japan's "peace contributor" role tested amid U.S.-Iran tension

Abe urges Iran's constructive role in easing Middle East tensions