The leaders of the Group of Seven developed nations agreed Thursday to improve the lot of the middle class worldwide, pledging to spur economic growth, fight corruption and clamp down on tax evasion by the rich, a high-ranking Japanese official said.

The agreement was reached during the first session of the G-7 summit in the city of Shima, Mie Prefecture, with Prime Minister Shinzo Abe as chairman.

“We had discussion on the world economy and agreed that the world economy is facing . . . a major risk,” Abe told reporters after the session.

To cope with that risk, the G-7 members agreed to compile a set of economic measures to be called the Ise-Shima Economic Initiative, Abe said.

“This a major achievement,” he said.

The Japanese official, who monitored the session, added that the leaders noted that frustrations are growing among the middle class, which faces a bleak future amid a widening income gap.

The leaders failed to agree on how much exactly each G-7 country should spend to spur growth and thereby benefit the middle class the world over.

This apparently reflects policy differences among the G-7 countries, as Germany and Britain have refused Japan’s repeated requests for them to spend more to prop up the world economy.

Still, the Japanese official who briefed reporters emphasized that the G-7, which includes representatives from the European Union, has agreed on the necessity of “wise spending” to spur growth and benefit the middle class, such as investments in science, education and the digital economy.

Reaching this consensus is “a major step,” the official maintained.

Later in the day, the G-7 leaders held a separate session on diplomacy and security issues.

During the session the participants agreed a joint G-7 communique to be issued Friday will express “concerns” over the situation in the South and East China seas and emphasize that international law should be observed and no use of force is allowed to solve territorial disputes, the Japanese official said.

The communique will not mention China by name, but the G-7 leaders did discuss China-related security issues, the official said.

The communique, which will also emphasize the conventions of freedom of navigation and flight on the high sea, is likely to draw protest from Beijing.

During the morning session on the global economy, the G-7 members agreed that economic conditions of certain developing countries have deteriorated considerably.

Abe maintained that this could develop into a “crisis” and called on the other G-7 countries to take bold steps. But another participant responded that the word “crisis” may be too strong, the official said.

Abe explained the economic risks the world could be facing, citing the economic indicators seen before and after the Lehman Brothers collapse of August 2008.

Even though Abe said he is not “pessimistic” about the global economy, he cautioned that the G-7 should not turn a blind eye to economic conditions and instead must take appropriate measures to prevent another global crisis.

The leaders also reaffirmed the importance of using all tools at their disposal, including monetary policy, structural reform and fiscal stimulus.Later in the day, diplomats from the G-7 nations were expected to draw up a joint communique and supporting statements to be issued Friday at the summit’s conclusion.

The leaders also noted middle-class frustration with the rich in light of the Panama Papers, which has revealed how the world’s most powerful people dodge tax payments by parking their assets in offshore tax havens such as the Virgin Islands.

The G-7 members said they will crack down on illicit money flows linked to money laundering and reveal the names of the paper companies that critics say are often used to evade taxes.

On Friday, the G-7 leaders plan to hold “outreach” sessions with several developing countries in the morning.

Abe will host a concluding news conference in the afternoon.