Japan told Ukraine and Russia on Tuesday that diplomacy is the path toward defusing their escalating crisis amid fears that Moscow may invade the Eastern European nation.

Prime Minister Fumio Kishida spoke by phone with Ukrainian President Volodymyr Zelenskyy to underscore Japan's support for Ukraine's sovereignty and territorial integrity, saying that his country opposes the use of force to change the status quo.

Separately, Foreign Minister Yoshimasa Hayashi told Russian Economic Development Minister Maksim Reshetnikov in an online meeting that Moscow should pursue a diplomatic solution to the turmoil, according to the Foreign Ministry.

Combined photo shows Ukrainian President Volodymyr Zelenskyy (R, Getty) and Japanese Prime Minister Fumio Kishida (Kyodo)

The flurry of diplomacy came as Japan dangled the threat of sanctions, in concert with other members of the Group of Seven industrialized nations, if Russia invades Ukraine. Russia said some military units have begun returning from exercises near Ukraine.

"Should Russia turn to military force or launch an invasion, we need to take appropriate steps, including sanctions, in coordination with the G-7 and other nations," Kishida told reporters at his office.

At the same time, Kishida said that he and Zelenskyy agreed "tenacious diplomatic efforts should ensue so that tensions will ease."

The ministry quoted the prime minister as saying that Japan appreciates Ukraine's "restrained" approach to the current situation.

Calling Ukraine an important partner that shares basic values, such as freedom and democracy, he said Japan is ready to extend loans worth over $100 million to help the country as requested by Kyiv.

Their talks, which lasted about 30 minutes, came as the United States and major European nations, such as France and Germany, have been stepping up diplomacy to avert a further escalation of the situation.

Kishida also spoke by phone with Ursula von der Leyen, president of the European Commission, and affirmed close coordination in responding to the crisis over which they shared grave concern.

Japanese Prime Minister Fumio Kishida speaks to reporters at his office in Tokyo following phone talks with Ukrainian President Volodymyr Zelenskyy on Feb. 15, 2022, in the midst of rising tensions between Russia and Ukraine. (Kyodo) ==Kyodo

The leaders expressed their support for ensuring Ukraine's sovereignty and territorial integrity, according to the Japanese ministry.

The G-7 members -- Britain, Canada, France, Germany, Italy, Japan and the United States -- have threatened sanctions that would have "massive" economic consequences on Russia in the event of an invasion.

Japan's sanctions may include restricting exports of high-tech and other products to Russia and freezing assets held by companies and individuals linked to the Russian president, government sources have said.

The Ukraine-Russia situation has raised fears about energy supplies with European nations reliant on Russian natural gas.

Japan and the European Union agreed to ensure energy security during a 20-minute phone conversation between their leaders.

The chief of the commission, or the EU's executive branch, expressed appreciation for Japan's recent decision to divert part of its liquefied natural gas imports to Europe. Kishida described the move as intended to show "solidarity" with allies and like-minded nations, the ministry said.

Russian President Vladimir Putin has maintained dialogue with U.S. and European leaders. But the outlook for a breakthrough remains uncertain, with Russia demanding guarantees that the North Atlantic Treaty Organization, a collective security arrangement, will not expand eastward to include Ukraine.

The Japanese government has set up a liaison office in the western Ukraine city of Lviv to help protect around 130 Japanese nationals who were confirmed to be in the country as of Monday.

"We will do our utmost in securing the safety of the people in light of the situation," said Chief Cabinet Secretary Hirokazu Matsuno, the government's top spokesman.

Japan has found itself in a unique and difficult position, as its own territorial dispute with Russia over a group of islets has remained unresolved for decades.

Defense Minister Nobuo Kishi said Russian naval vessels were increasing activities in the Sea of Japan and waters near Japan, apparently demonstrating their capabilities amid the military buildup around Ukraine.

Past Japanese leaders have stepped up calls for the return of the islands known as the Northern Territories in Japan and the Southern Kurils in Russia to no avail, and the unresolved issue has made Tokyo's dealings with Moscow complicated.

When Russia annexed Crimea in 2014, Japan joined the United States and other European nations in imposing sanctions against Russia. Critics, however, raised questions about the effectiveness of the steps Tokyo has taken and its measured approach.

Related coverage:

Most of Japan's embassy staff in Ukraine to leave as tensions grow

Biden-Putin call fails to ease concerns over Ukraine invasion

U.S. warns Russia could launch invasion of Ukraine during Olympics