The foreign ministers of the Group of Seven nations on Wednesday reaffirmed their cooperation in support of Ukraine as it battles Russia's invasion, while condemning Moscow's "sham referenda" in occupied regions in the Eastern European nation.

The top diplomats also confirmed the importance of peace and stability across the Taiwan Strait, apparently with China's growing military pressure on the self-ruled democratic island in mind, according to a statement issued after a meeting in New York by the government of Germany, this year's rotating chair of the G-7.

The gathering was held on the sidelines of the U.N. General Assembly's annual session.

Foreign ministers from the Group of Seven nations pose for photos as they meet in New York on Sept. 21, 2022. (Photo courtesy of the Japanese Foreign Ministry)(Kyodo)

The G-7 ministers were "unanimous in their unwavering commitment to continue and sustain economic, financial, humanitarian, military and diplomatic support for Ukraine for as long as necessary and to the extent necessary, to ensure Ukraine's path to freedom, peace, reconstruction and economic development," the chair's statement said.

The meeting came after officials in Russian-occupied parts of Ukraine announced earlier this week plans for Russia to annex four eastern and southern regions, in Moscow's latest effort to consolidate its hold on territory.

The foreign ministers "strongly condemned" Moscow's announcement to conduct "sham referenda on sovereign Ukrainian territory," the statement said, adding, "Any referenda held under conditions of Russian military presence, intimidation, and forced deportation cannot be free or fair."

In a televised national address earlier on Wednesday, Russian President Vladimir Putin said his nation would use "all the means at our disposal" to protect its territory and people, hinting at the possibility of using nuclear weapons.

The G-7 ministers "deplored deliberate Russian escalatory steps" and its "irresponsible nuclear rhetoric," according to the statement.

Japanese Foreign Minister Yoshimasa Hayashi told reporters after the meeting that the remarks by Putin are "totally unacceptable" and that other G-7 foreign ministers also aired serious concerns during the talks about how Moscow is responding to recent events in Ukraine.

The prolonged Russian war on Ukraine, which began in late February, is testing the unity of the G-7 nations, which have been working to maintain severe economic sanctions on Moscow over the invasion.

Along with freezing assets belonging to key Russian figures and the Russian central bank, the punitive measures include a U.S. embargo on Russian oil imports and a phase-out of them by Japan and the European Union. Those steps have led to higher global oil prices as Moscow is one of the world's largest oil producers.

"It is becoming even more important to maintain the unity of the G-7 nations to keep strong sanctions on Russia and support for Ukraine" as countries dependent on imports of fossil energy resources head into the winter season, Hayashi said.

As for China, the G-7 foreign ministers issued a statement in early August criticizing Beijing's increasing military pressure on Taiwan in response to U.S. House Speaker Nancy Pelosi's visit to the island last month.

Beijing views it as a breakaway province to be reunified with the mainland, by force if necessary.

Soon after the third-highest-ranking U.S. official's trip to Taipei, Beijing began large-scale, live-fire drills near Taiwan, including firing ballistic missiles into waters off the island, some of which fell into Japan's exclusive economic zone.

Hayashi said he told his counterparts that Japan, which will assume the rotating presidency of the G-7 next year, will host the group's three-day meeting of foreign ministers from April 16 in the central Japan town of Karuizawa.

Wednesday's G-7 gathering was the first in-person foreign ministerial meeting since May. The G-7 consists of Britain, Canada, France, Germany, Italy, Japan and the United States, plus the European Union.

Related coverage:

G-7 trade ministers pledge to boost supply chain resiliency

G-7 agree on Russian oil price cap to deplete Moscow's war chest

G-7 raps Myanmar junta executions as showing contempt for democracy