French President Emmanuel Macron's drive to realize dialogue between the United States and Iran amid a standoff over a 2015 nuclear deal are complicating efforts by Japanese Prime Minister Shinzo Abe, who also intends to act as a mediator.

Despite his historic visit to Iran in June, Abe is widely seen as becoming out of the loop, foreign policy experts say, warning he should assume more visible roles in defusing tensions between Washington and Tehran, and that any indecisive behavior would only hurt Japan's reputation in the international arena.

In a surprise move, Macron invited Iran's foreign minister to Biarritz, the French resort where Group of Seven leaders were discussing Tehran's nuclear deal. The president has expressed hope that U.S. President Donald Trump and Iranian President Hassan Rouhani could meet within weeks.

Trump, who had hardened his stance on Tehran, indicated he would accept the overture, saying there has to be a meeting at some point but that the circumstances need to be "right."

"It's about time for Abe to take action of some sort," said Momoyo Kondo, an associate research fellow at the Middle East Institute of Japan. "Abe can support France...or try to persuade the United States to ease sanctions on Iran."

Japan has been treading carefully in responding to the recent spike in Middle East tensions following the U.S. withdrawal from the nuclear deal last year and its reinstatement of economic sanctions.

Iran has suspended some commitments that it made under the nuclear accord.

G-7 members Britain, France and Germany, are part of the nuclear deal under which Iran promised to curb its nuclear activities in exchange for the lifting sanctions.

France, chair of this year's G-7 meetings, had stepped up efforts to salvage the deal in the run-up to the summit, which ended Monday.

Abe said at a press conference after the meeting that G-7 leaders spent long hours discussing Iran, and that it was meaningful that they agreed to the importance of diplomacy "to create an environment in which Iran can engage in dialogue."

The G-7 leaders summed up their discussions on Iran in one sentence in a post-summit declaration.

"We fully share two objectives: to ensure that Iran never acquires nuclear weapons and to foster peace and stability in the region," it said.

The United States has also been calling on its allies, including Japan, to participate in a coalition to fend off Iranian threats to ships sailing through the Strait of Hormuz, a key waterway for oil transport. Iran used to be one of the major oil exporters to resource-poor Japan.

Sachi Sakanashi, managing director at the Institute of Energy and Economics Japan, said Tokyo's immediate task is to help set the stage for U.S.-Iran dialogue.

"Iran understands the uniqueness of the Japan-U.S. security relationship. So even if Japan decides to take part in the U.S.-led initiative, the Japan-Iran relationship is unlikely to change dramatically," Sakanashi said.

"If Japan can help restore regional stability by achieving Iran's dialogue with the United may not have to join the initiative now," Sakanashi also said.

Japan has yet to clarify its stance.

Trump, who backed Abe's diplomatic outreach to Iran, called him "a positive force."

At a joint press conference with Macron after the G-7 summit, Trump also said Macron kept him up-to-date on developments related to Iranian Foreign Minister Mohammad Javad Zarif's visit to Biarritz.

But Trump said he did not think it was "appropriate" to meet Zarif too soon, adding that "things have to be worked out first."

As Abe has already stepped in to help turn around the Iranian situation, he needs to make clear how Japan could commit to the relevant effort, Kondo of the Tokyo-based institute, said. "An indecisive stance would undermine Iran's trust in Japan."