Prime Minister Shinzo Abe said Wednesday that he will attend the opening ceremony of South Korea’s Pyeongchang Winter Olympics on Feb. 9.

The announcement put an end to weekslong speculation that he may forgo the trip in protest against Seoul’s recent move to revisit the 2015 deal in relation to so-called comfort women, a euphemism for the women and girls who were forced to work in Japanese military brothels before and during World War II.

“If circumstances allow, I am thinking of attending the opening ceremony of the Pyeongchang Olympics,” Abe told a group of reporters at the Prime Minister’s Office on Wednesday morning.

At the same time, Abe said he hopes to hold a summit meeting at the games in the city of Pyeongchang with South Korean President Moon Jae-in to “firmly convey Japan’s position” on the landmark 2015 pact between Tokyo and Seoul that was supposed to”finally and irreversibly” resolve the long-simmering comfort women issue.

Abe also said he wants to take the opportunity to confirm with Moon the need for their two countries and the United States to stand together against the military threat posed by North Korea, stressing the importance of “maintaining maximum pressure” on the regime.

The prime minister’s decision to attend also comes amid signs that tensions on the Korean Peninsula are easing. North and South Korea agreed in talks last week that their athletes will march under a Korean unification flag at the opening ceremony, as well as field a unified women’s ice hockey team.

Chief Cabinet Secretary Yoshihide Suga insisted Abe’s judgment was not swayed by Washington’s decision to send a delegation led by Vice President Mike Pence to Pyeongchang, instead emphasizing that Japan — as an Asian neighbor and with its capital Tokyo as the host of the 2020 Olympics — wanted to “play a part” to make South Korea’s hosting of the Winter Games successful.

Abe’s trip will also create an opportunity for the nation’s leader to directly encourage Japan’s athletes, Suga said at a news conference.

Asked about concerns within the ruling Liberal Democratic Party that Abe’s attendance may be misconstrued by the global community as a virtual endorsement of Seoul’s recent move to reconsider the comfort women pact, Suga offered reassurance that Abe will stand firm.

“We will tell Seoul that the comfort women deal is a government-to-government agreement that makes (any) attempt to unilaterally seek any additional measures absolutely unacceptable and request the deal’s steady implementation,” the top government spokesman said.

Earlier this month, the Moon administration sparked the ire of Japanese officials by demanding a “voluntary and sincere” apology from Tokyo for the comfort women, characterizing the pact — a legacy of his predecessor Park Geun-hye — as flawed for failing to fully take into account the feelings of the victims. Abe has rejected calls to offer a fresh apology.

South Korea had also expressed its intention to establish its own fund worth ¥1 billion in support of the survivors, effectively snubbing financial aid of the same value already provided by Japan under the accord.

The diplomatic furor had left domestic media awash with speculation that Abe would reject an invitation from Seoul to attend the Olympics ceremony, with major outlets such as the Yomiuri Shimbun quoting government sources as taking a dim view of the prospect of Abe’s attendance.

Opinion appears split within the ruling party over whether Abe should go. While LDP Secretary-General Toshihiro Nikai told reporters earlier this month that he thinks Abe’s attendance of Diet committee meetings should be scheduled to make room for a visit to the Winter Games, the view was not necessarily echoed by some of those in the party’s more conservative ranks. The ordinary Diet session convened on Monday.

On Wednesday, LDP lawmakers present at an internal party meeting tasked with “restoring Japan’s reputation and trust” discussed the 2015 deal and “unanimously voiced opposition” to the idea of Abe going to South Korea, according to a tweet sent by Upper House lawmaker Kimi Onoda.

Hiroshi Yamada, another LDP lawmaker from the House of Councilors, also took to Twitter to express frustration over Abe’s announcement.

“Prime Minister Abe going to Pyeongchang to convey Japan’s opposition to President Moon’s latest policy doesn’t make sense. If anything, the president should come to us first,” he tweeted.