President Donald Trump warned Sunday that North Korea’s Kim Jong Un had “everything” to lose through hostility toward the United States, after Pyongyang said it had carried out a major new weapons test.

“Kim Jong Un is too smart and has far too much to lose, everything actually, if he acts in a hostile way,” Trump tweeted in response to the unspecified test at the Sohae space launch center.

The announcement of Saturday’s test came just hours after Trump said he would be “surprised” by any hostile action from the North, emphasizing his “very good relationship” with Kim.

Trump and Kim engaged in months of mutual insults and threats of devastation in 2017, sending tensions soaring before a diplomatic rapprochement the following year.

The pair have met three times since June 2018 but with little progress towards denuclearization. Pyongyang has set Washington a December 31 deadline to make new concessions to kickstart stalled talks.

“North Korea, under the leadership of Kim Jong Un, has tremendous economic potential, but it must denuclearize as promised,” Trump tweeted. “NATO, China, Russia, Japan, and the entire world is unified on this issue!”

Writing that Kim had “signed a strong Denuclearization Agreement” at their June 2018 summit in Singapore,” Trump warned: “He does not want to void his special relationship with the President of the United States or interfere with the U.S. Presidential Election in November.”

A spokesman for North Korea’s Academy of the National Defense Science said Saturday’s “very important test” would have an “important effect” on changing the “strategic position” of North Korea, in a statement carried by the official KCNA news agency.

The statement did not provide further details on the test.