In a joint statement, the G7 countries said they were concerned about China’s actions in the South China Sea and that they “strongly oppose any unilateral attempts to change the status quo by force or coercion.”
The communique, released at the start of the three-day summit in Japan, added that they were prepared to build “constructive and stable" relations with Beijing while reducing their dependence on trade with the world’s second largest economy.
The joint statement drew a quick reaction from Beijing, which complained to Japan as the summit organiser.
The Chinese foreign ministry said that the G7 had attacked it and interfered in its internal affairs, including Taiwan.
The ministry said in a statement it had expressed strong dissatisfaction and has lodged stern representations with summit host Japan.
G7 nations - the US, Japan, Germany, Britain, France, Italy and Canada - are grappling with the challenges posed by Russia’s invasion of Ukraine and tensions with China, including over Taiwan.
Separately, Ukraine’s Volodymyr Zelensky held talks with India’s Narendra Modi on Saturday at the summit and was due to meet other ‘Global South’ leaders in a bid to widen support for his country’s efforts to resist Russia’s invasion.
The meeting, being held in Hiroshima, has already agreed new sanctions on Russia.
Flown in from an Arab League summit on a French government jet, Mr Zelensky held talks with Modi as part of a series of meetings with non-aligned countries in attendance.
He said that the two discussed Ukraine’s needs concerning mobile hospitals and the removal of landmines and that he had invited India to join Ukraine’s peace formula.
Modi’s Twitter account posted a photo of the two shaking hands, noting he had told Mr Zelensky of India’s readiness to continue humanitarian help for the people of Ukraine.
India has not distanced itself from Russia in the aftermath of the invasion and its oil deals with Russia are seen as undermining Western sanctions.
India’s fuel purchases from Russia were not discussed in Saturday’s meeting, India’s foreign secretary, Vinay Kwatra, told reporters.