The message, in which Tokyo claimed Seoul is out of lockstep with G7 members on Chinese and North Korean issues, was conveyed by a high-level Japanese government official immediately after Trump on May 30 broached the idea of inviting Australia, India, Russia and South Korea to this year's summit. The U.S. leader is due to preside over the summit later this year.
The diplomatic sources said the U.S. side told the Japanese official that any final decision on the issue would rest with Trump.
The revelation that Japan expressed opposition to South Korea's participation is likely to upset Seoul, which has welcomed Trump's offer. It could further sour Tokyo-Seoul ties already overshadowed by disputes over wartime history and other issues.
On a TV program Sunday, Foreign Minister Toshimitsu Motegi echoed Tokyo's opposition to Trump's suggestion.
"It's crucial to keep the G7 framework itself, and I believe this is an overall consensus," he said.
For Japan, South Korea's inclusion would mean losing its status as the sole Asian member of the G7, which also brings together Britain, Canada, France, Germany, Italy, the United States, and the European Union.
Trump has suggested that he wants to expand the G7 because he believes the current membership does not properly represent the global situation and is "very outdated."
Trump was also quoted as telling South Korean President Moon Jae-in during phone talks earlier in June that he may also invite Brazil, with the expanded group to be called either the "G11" or "G12," according to the South Korean presidential office.
According to the sources, the high-level Japanese official pointed to the Moon administration's perceived pro-China policy as problematic, apparently with the Trump administration's current confrontational approach to China in mind.
The Moon administration has also striven to boost inter-Korean relations. The Trump administration has not budged from its stance of maintaining sanctions on Pyongyang during talks to denuclearize North Korea, which have been stalled for months.
According to the sources, the Japanese government has refrained from publicly expressing its opposition to South Korea's participation, thinking that Trump's G7 expansion proposal may be just "a thought" that might fizzle out.
Japan's top government spokesman Yoshihide Suga said at a news conference on June 1 that the G7 is an "important framework" for coordination in tackling global challenges.
Asked whether the U.S. government had informed Japan of Trump's G7 expansion plan, Suga said, "I will refrain from speaking about the details, but Japan and the United States are engaged in close communication."
Members such as Canada, meanwhile, have expressed opposition to Russia's return to the forum. Russia, which was a member of the Group of Eight, was dropped from the framework following the international outcry over its annexation of Crimea in 2014.
"We thought Japan does not need to lead the opposition (on this issue)," one of the sources said.
Trump has been unclear on exactly when he plans to hold the G7 summit after postponing it from June. He said on May 30 that it could take place in September or even after the November presidential election.
While it is up to the holder of the rotating G7 presidency to decide which countries to invite as guests to the summit, changing the format on a permanent basis would require all members' consent.
Japan would not object to South Korea merely taking part in an outreach session of the G7 meeting, the sources said.