The aftershocks of the weekend’s Group of 20 summit and related events continue to reverberate throughout the government.

After the two-day meeting in Osaka ended Saturday, top officials rushed to control the damage from U.S. President Donald Trump’s shocking criticism of the Japan-U.S. security treaty, emphasizing that Trump’s remarks on Twitter and in media interviews are different from those officially held by Washington.

Trump, one of the key figures at the G20 summit, had strongly criticized the 1951 security treaty — a cornerstone of U.S. policy in the region — in media interviews, calling the pact one-sided as Japan does not need to come to the U.S.’s aid if it is attacked.

“The alliance is extremely strong. President Trump, too, said he is not thinking of ripping up the Japan-U.S. alliance,” Prime Minister Shinzo Abe said Sunday during a debate program with other party leaders hosted by internet video-sharing service Niconico.

On Monday, a senior Foreign Ministry official pointed out Trump has made “various remarks about almost everything,” and many of them are different from the official positions held by the U.S. government.

“The Japanese government shouldn’t react to a tweet by the president each time. That’s not the right response for us,” said the official, speaking on condition of anonymity.

“If it’s their official position, we need to deal with it, but the president says various things,” the official said.

The senior official also argued the security obligations under the treaty are “well-balanced,” reiterating Tokyo’s official view of the bilateral military arrangements.

While Article 5 of the treaty obliges the U.S. to defend Japan if the country is attacked, Article 6 allows the U.S. military to use large areas of land in Japan for military bases, the official pointed out.

During Sunday’s policy debate, Abe also pointed out that what Japan can do is limited under the postwar pacifist Constitution, which restricts its military operations strictly to self-defense.

“I have explained to the president the (legal) constraints of the Self-Defense Forces under the Constitution and what we could do. I have explained it to him since I met him for the first time at Trump Tower” in New York in November 2016, he said.

For years, the U.S.-drafted postwar Constitution was officially interpreted as banning Japan from using the right of collective self-defense, or the right to attack a third country that has launched an assault against an allied state.

In 2014, Abe revised the long-standing constitutional interpretation to expand the legal scope of the SDF’s joint military operations with U.S. forces and enacted relevant laws in the following year. But even under Abe’s controversial interpretation of the war-renouncing Article 9, Japan can only use the right of collective self-defense if Japan’s “survival” is at stake.

Senior officials at the Foreign Ministry also emphasized that U.S. officials at both the Pentagon and the State Department have reaffirmed the view in a key joint statement that Abe and Trump himself signed in February 2017.

“The unshakable U.S.-Japan Alliance is the cornerstone of peace, prosperity, and freedom in the Asia-Pacific region. The U.S. commitment to defend Japan through the full range of U.S. military capabilities, both nuclear and conventional, is unwavering,” the 2017 statement reads.

“Amid an increasingly difficult security environment in the Asia-Pacific region, the United States will strengthen its presence in the region, and Japan will assume larger roles and responsibilities in the alliance, ” the statement said.

Before Friday’s Abe-Trump meeting, held on the sidelines of the G20 summit, “we were worried to some extent,” the official also said.

“But the meeting was very friendly and ended with a relaxed atmosphere. Our worries proved unfounded,” the official said.

During their meeting, neither side raised the topic of Trump’s latest criticism about the security issue, according to Japanese diplomats.

Yasushi Watanabe, professor of Keio University and an expert on American politics, said Abe probably intentionally avoided bringing up the topic during their meeting because it probably would have only provoked Trump, which would have led to him venting his long-held frustrations about the security treaty.

“It would be only natural for the Japanese side to behave in that way,” he said. Shortly before the G20 summit, Japanese officials were already deeply concerned about the way things were going.

During an interview with Fox Business on June 26, just two days before the summit began, Trump lambasted the “unfair” treaty, saying the U.S. is unilaterally obliged to defend Japan if the country is attacked by a third country, while Japan does not need to defend the U.S. if it is comes under attack.

“If Japan is attacked, we will fight World War III,” he said. “We will go in and protect them with our lives and with our treasure. But if we’re attacked, Japan doesn’t have to help us. They can watch it on a Sony television.”

Japanese officials had immediately tried to play down Trump’s remarks, saying he didn’t raise the issue during his bilateral talks with Abe in Osaka.

But Trump again repeated his verbal attack on the security treaty during a news conference held right after the summit.

“I’m just saying that it’s an unfair agreement. And I’ve told (Abe) that for the last six months,” Trump said.

“That’s the kind of deals we made … I said we’re going to have to change it,” Trump said.

Japanese officials say Trump has never criticized the bilateral military arrangements, at least during official conversations with top Japanese officials, since becoming president.

Trump’s remark is potentially damaging for Abe’s administration. Japan’s military alliance is the centerpiece of most of Abe’s diplomatic strategies, including those to keep China, North Korea and even Russia in check, and it has for decades been the foundation of the Japan-U.S. relationship and the centerpiece of U.S. strategy in the Asia-Pacific region.

It could also deal a blow to Abe’s government ahead of the Upper House election to be held later this month, as the prime minister, who has boasted of his strong ties with Trump, has always argued that the Japan-U.S. military alliance has never been stronger.

U.S. bases include Yokosuka naval base in Kanagawa Prefecture, the largest overseas U.S. naval installation in the world, and Kadena Air Base in Okinawa Prefecture, the largest U.S. Air Force base in the region.