​WASHINGTON – President Trump and Japanese Prime Minister Shinzo Abe announced Sunday that the two countries had agreed to the framework of a trade deal.

“We’ve been working on a deal with Japan for a long time. And we’ve agreed in principle,” Trump said, adding that the deal would amount to “billions and billions of dollars.”

Japan, Trump said, agreed to buy excess corn from American farmers.

“With regard to the potential purchase of American corn, in Japan we are now experiencing insect pests on some agricultural products,” Abe explained to the White House pool, using a translator. “And there is a need for us to buy some of the agricultural products.”

Overall, according to U.S. Trade Rep. Robert Lighthizer, the deal would focus on three areas: agriculture, industrial tariffs and digital trade.

“It’s very good news for our farmers and ranchers,” Lighthizer said.

The afternoon announcement, on the sidelines of the G​-​7 conference in Biarritz, France​,​ was unscheduled.

Trump has received pushback from world leaders over his ongoing trade war with China.

Though White House economic adviser Larry Kudlow pointed to the Japan deal as evidence that it wouldn’t do real harm to the American consumer.

“There may be a small, minimal impact,” Kudlow said Sunday on CNN’s “State of the Union.” “The largest part of the economic burden of the tariffs has fallen on China,” Kudlow said.

Abe said the Japanese and the Americans “would like to set a goal” of signing the new trade agreement when both he and Trump are in New York for the United Nations General Assembly in September.